sascha@167: package de.intevation.flys.model; sascha@167: sascha@167: import java.io.Serializable; sascha@167: sascha@167: import java.util.Date; sascha@167: sascha@171: import javax.persistence.Entity; sascha@171: import javax.persistence.Id; sascha@171: import javax.persistence.Table; sascha@171: import javax.persistence.GeneratedValue; sascha@171: import javax.persistence.Column; sascha@171: import javax.persistence.SequenceGenerator; sascha@171: import javax.persistence.GenerationType; sascha@171: sascha@171: @Entity sascha@171: @Table(name = "time_intervals") sascha@167: public class TimeInterval sascha@167: implements Serializable sascha@167: { sascha@168: private Integer id; sascha@172: private Date startTime; sascha@172: private Date stopTime; sascha@167: sascha@167: public TimeInterval() { sascha@167: } sascha@167: sascha@171: @Id sascha@171: @SequenceGenerator( sascha@171: name = "SEQUENCE_TIME_INTERVALS_ID_SEQ", sascha@171: sequenceName = "TIME_INTERVALS_ID_SEQ", sascha@171: allocationSize = 1) sascha@171: @GeneratedValue( sascha@171: strategy = GenerationType.SEQUENCE, sascha@171: generator = "SEQUENCE_TIME_INTERVALS_ID_SEQ") sascha@171: @Column(name = "id") sascha@171: public Integer getId() { sascha@171: return id; sascha@171: } sascha@171: sascha@168: public void setId(Integer id) { sascha@167: this.id = id; sascha@167: } sascha@167: sascha@172: @Column(name = "start_time") // FIXME: type mapping needed? sascha@172: public Date getStartTime() { sascha@172: return startTime; sascha@172: } sascha@172: sascha@167: public void setStartTime(Date startTime) { sascha@167: this.startTime = startTime; sascha@167: } sascha@167: sascha@172: @Column(name = "stop_time") // FIXME: type mapping needed? sascha@172: public Date getStopTime() { sascha@172: return stopTime; sascha@167: } sascha@167: sascha@167: public void setStopTime(Date stopTime) { sascha@167: this.stopTime = stopTime; sascha@167: } sascha@167: } sascha@167: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :