ingo@2847: package de.intevation.flys.model; ingo@2847: ingo@2847: import java.io.Serializable; ingo@2847: ingo@2847: import javax.persistence.Entity; ingo@2847: import javax.persistence.Id; ingo@2847: import javax.persistence.Table; ingo@2847: import javax.persistence.GeneratedValue; ingo@2847: import javax.persistence.Column; ingo@2847: import javax.persistence.SequenceGenerator; ingo@2847: import javax.persistence.GenerationType; ingo@2847: import javax.persistence.JoinColumn; ingo@2847: import javax.persistence.OneToOne; ingo@2847: ingo@2847: import org.apache.log4j.Logger; ingo@2847: ingo@2847: ingo@2847: @Entity ingo@2847: @Table(name = "waterlevel_difference_values") ingo@2847: public class WaterlevelDifferenceValue ingo@2847: implements Serializable ingo@2847: { ingo@2847: private static Logger logger = ingo@2847: Logger.getLogger(WaterlevelDifferenceValue.class); ingo@2847: ingo@2847: ingo@2847: private Integer id; ingo@2847: ingo@2847: private WaterlevelDifferenceColumn column; ingo@2847: ingo@2847: private Double station; ingo@2847: private Double value; ingo@2847: ingo@2847: ingo@2847: public WaterlevelDifferenceValue() { ingo@2847: } ingo@2847: ingo@2847: public WaterlevelDifferenceValue( ingo@2847: WaterlevelDifferenceColumn column, ingo@2847: Double station, ingo@2847: Double value ingo@2847: ) { ingo@2847: this.column = column; ingo@2847: this.station = station; ingo@2847: this.value = value; ingo@2847: } ingo@2847: ingo@2847: ingo@2847: @Id ingo@2847: @SequenceGenerator( ingo@2847: name = "SEQUENCE_WATERLEVEL_DIFF_VALUES_ID_SEQ", ingo@2847: sequenceName = "WATERLEVEL_DIFF_VALUES_ID_SEQ", ingo@2847: allocationSize = 1) ingo@2847: @GeneratedValue( ingo@2847: strategy = GenerationType.SEQUENCE, ingo@2847: generator = "SEQUENCE_WATERLEVEL_DIFF_VALUES_ID_SEQ") ingo@2847: @Column(name = "id") ingo@2847: public Integer getId() { ingo@2847: return id; ingo@2847: } ingo@2847: ingo@2847: public void setId(Integer id) { ingo@2847: this.id = id; ingo@2847: } ingo@2847: ingo@2847: @OneToOne ingo@2847: @JoinColumn(name = "column_id" ) ingo@2847: public WaterlevelDifferenceColumn getColumn() { ingo@2847: return column; ingo@2847: } ingo@2847: ingo@2847: public void setColumn(WaterlevelDifferenceColumn column) { ingo@2847: this.column = column; ingo@2847: } ingo@2847: ingo@2847: @Column(name = "station") ingo@2847: public Double getStation() { ingo@2847: return station; ingo@2847: } ingo@2847: ingo@2847: public void setStation(Double station) { ingo@2847: this.station = station; ingo@2847: } ingo@2847: ingo@2847: @Column(name = "value") ingo@2847: public Double getValue() { ingo@2847: return value; ingo@2847: } ingo@2847: felix@2848: public void setValue(Double value) { ingo@2847: this.value = value; ingo@2847: } ingo@2847: } ingo@2847: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :