ingo@2810: package de.intevation.flys.model; ingo@2810: ingo@2810: import java.io.Serializable; ingo@2810: ingo@2810: import java.util.ArrayList; ingo@2810: import java.util.List; ingo@2810: ingo@2810: import javax.persistence.Entity; ingo@2810: import javax.persistence.Id; ingo@2810: import javax.persistence.Table; ingo@2810: import javax.persistence.GeneratedValue; ingo@2810: import javax.persistence.Column; ingo@2810: import javax.persistence.SequenceGenerator; ingo@2810: import javax.persistence.GenerationType; ingo@2810: import javax.persistence.JoinColumn; ingo@2810: import javax.persistence.OneToOne; ingo@2810: import javax.persistence.OneToMany; ingo@2810: ingo@2810: ingo@2810: @Entity ingo@2810: @Table(name = "bed_height_epoch") ingo@2810: public class BedHeightEpoch implements Serializable { ingo@2810: ingo@2810: private Integer id; ingo@2810: ingo@2810: private River river; ingo@2810: ingo@2810: private TimeInterval timeInterval; ingo@2810: ingo@2810: private ElevationModel curElevationModel; ingo@2810: private ElevationModel oldElevationModel; ingo@2810: ingo@2810: private Range range; ingo@2810: ingo@2810: private String evaluationBy; ingo@2810: private String description; ingo@2810: ingo@2810: private List values; ingo@2810: ingo@2810: ingo@2810: public BedHeightEpoch() { ingo@2810: } ingo@2810: ingo@2810: ingo@2810: public BedHeightEpoch( ingo@2810: River river, ingo@2810: TimeInterval timeInterval, ingo@2810: Range range, ingo@2810: ElevationModel curElevationModel, ingo@2810: ElevationModel oldElevationModel, ingo@2810: String evaluationBy, ingo@2810: String description ingo@2810: ) { ingo@2810: this.river = river; ingo@2810: this.timeInterval = timeInterval; ingo@2810: this.range = range; ingo@2810: this.curElevationModel = curElevationModel; ingo@2810: this.oldElevationModel = oldElevationModel; ingo@2810: this.evaluationBy = evaluationBy; ingo@2810: this.description = description; ingo@2810: this.values = new ArrayList(); ingo@2810: } ingo@2810: ingo@2810: ingo@2810: @Id ingo@2810: @SequenceGenerator( ingo@2810: name = "SEQUENCE_BED_HEIGHT_EPOCH_ID_SEQ", ingo@2810: sequenceName = "BED_HEIGHT_EPOCH_ID_SEQ", ingo@2810: allocationSize = 1) ingo@2810: @GeneratedValue( ingo@2810: strategy = GenerationType.SEQUENCE, ingo@2810: generator = "SEQUENCE_BED_HEIGHT_EPOCH_ID_SEQ") ingo@2810: @Column(name = "id") ingo@2810: public Integer getId() { ingo@2810: return id; ingo@2810: } ingo@2810: ingo@2810: public void setId(Integer id) { ingo@2810: this.id = id; ingo@2810: } ingo@2810: ingo@2810: @OneToOne ingo@2810: @JoinColumn(name = "river_id" ) ingo@2810: public River getRiver() { ingo@2810: return river; ingo@2810: } ingo@2810: ingo@2810: public void setRiver(River river) { ingo@2810: this.river = river; ingo@2810: } ingo@2810: ingo@2810: @OneToOne ingo@2810: @JoinColumn(name = "time_interval_id") ingo@2810: public TimeInterval getTimeInterval() { ingo@2810: return timeInterval; ingo@2810: } ingo@2810: ingo@2810: public void setTimeInterval(TimeInterval timeInterval) { ingo@2810: this.timeInterval = timeInterval; ingo@2810: } ingo@2810: ingo@2810: @OneToOne ingo@2810: @JoinColumn(name = "cur_elevation_model_id") ingo@2810: public ElevationModel getCurElevationModel() { ingo@2810: return curElevationModel; ingo@2810: } ingo@2810: ingo@2810: public void setCurElevationModel(ElevationModel curElevationModel) { ingo@2810: this.curElevationModel = curElevationModel; ingo@2810: } ingo@2810: ingo@2810: @OneToOne ingo@2810: @JoinColumn(name = "old_elevation_model_id") ingo@2810: public ElevationModel getOldElevationModel() { ingo@2810: return oldElevationModel; ingo@2810: } ingo@2810: ingo@2810: public void setOldElevationModel(ElevationModel oldElevationModel) { ingo@2810: this.oldElevationModel = oldElevationModel; ingo@2810: } ingo@2810: ingo@2810: @OneToOne ingo@2810: @JoinColumn(name = "range_id") ingo@2810: public Range getRange() { ingo@2810: return range; ingo@2810: } ingo@2810: ingo@2810: public void setRange(Range range) { ingo@2810: this.range = range; ingo@2810: } ingo@2810: ingo@2810: @Column(name = "evaluation_by") ingo@2810: public String getEvaluationBy() { ingo@2810: return evaluationBy; ingo@2810: } ingo@2810: ingo@2810: public void setEvaluationBy(String evaluationBy) { ingo@2810: this.evaluationBy = evaluationBy; ingo@2810: } ingo@2810: ingo@2810: @Column(name = "description") ingo@2810: public String getDescription() { ingo@2810: return description; ingo@2810: } ingo@2810: ingo@2810: public void setDescription(String description) { ingo@2810: this.description = description; ingo@2810: } ingo@2810: ingo@2810: @OneToMany ingo@2810: @JoinColumn(name = "bed_height_epoch_id") ingo@2810: public List getValues() { ingo@2810: return values; ingo@2810: } ingo@2810: ingo@2810: public void setValues(List values) { ingo@2810: this.values = values; ingo@2810: } ingo@2810: } ingo@2810: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :