/* * Copyright (C) 2012 McEvoy Software Ltd * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.bandstand.domain; import java.io.Serializable; import java.util.Date; import javax.persistence.*; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; @Entity @Cache(usage = CacheConcurrencyStrategy.READ_WRITE) public class Gig implements Serializable{ private Long id; private String displayName; private String fileName; private Band band; private Date startDate; private Date endDate; private Date createdDate; private Date modifiedDate; public Gig() { } @Id @GeneratedValue public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getDisplayName() { return displayName; } public void setDisplayName(String displayName) { this.displayName = displayName; } public String getFileName() { return fileName; } public void setFileName(String fileName) { this.fileName = fileName; } @ManyToOne public Band getBand() { return band; } public void setBand(Band band) { this.band = band; } @Column @Temporal(javax.persistence.TemporalType.TIMESTAMP) public Date getStartDate() { return startDate; } public void setStartDate(Date startDate) { this.startDate = startDate; } @Column @Temporal(javax.persistence.TemporalType.TIMESTAMP) public Date getEndDate() { return endDate; } public void setEndDate(Date endDate) { this.endDate = endDate; } @Column(nullable = false) @Temporal(javax.persistence.TemporalType.TIMESTAMP) public Date getCreatedDate() { return createdDate; } public void setCreatedDate(Date createdDate) { this.createdDate = createdDate; } @Column(nullable = false) @Temporal(javax.persistence.TemporalType.TIMESTAMP) public Date getModifiedDate() { return modifiedDate; } public void setModifiedDate(Date modifiedDate) { this.modifiedDate = modifiedDate; } }