ingo@2842: package de.intevation.flys.model; ingo@2842: ingo@2842: import java.io.Serializable; ingo@2842: ingo@2842: import javax.persistence.Entity; ingo@2842: import javax.persistence.Id; ingo@2842: import javax.persistence.Table; ingo@2842: import javax.persistence.GeneratedValue; ingo@2842: import javax.persistence.Column; ingo@2842: import javax.persistence.SequenceGenerator; ingo@2842: import javax.persistence.GenerationType; ingo@2842: import javax.persistence.JoinColumn; ingo@2842: import javax.persistence.OneToOne; ingo@2842: ingo@2842: import org.apache.log4j.Logger; ingo@2842: ingo@2842: ingo@2842: ingo@2842: ingo@2842: @Entity ingo@2842: @Table(name = "waterlevel_values") ingo@2842: public class WaterlevelValue ingo@2842: implements Serializable ingo@2842: { ingo@2842: private static Logger logger = Logger.getLogger(WaterlevelValue.class); ingo@2842: ingo@2842: private Integer id; ingo@2842: ingo@2845: private WaterlevelQRange qrange; ingo@2842: ingo@2842: private Double station; ingo@2842: private Double w; ingo@2842: ingo@2842: ingo@2842: public WaterlevelValue() { ingo@2842: } ingo@2842: ingo@2845: public WaterlevelValue(WaterlevelQRange qrange, Double station, Double w) { ingo@2845: this.qrange = qrange; ingo@2842: this.station = station; ingo@2842: this.w = w; ingo@2842: } ingo@2842: ingo@2842: ingo@2842: @Id ingo@2842: @SequenceGenerator( ingo@2842: name = "SEQUENCE_WATERLEVEL_VALUES_ID_SEQ", ingo@2842: sequenceName = "WATERLEVEL_VALUES_ID_SEQ", ingo@2842: allocationSize = 1) ingo@2842: @GeneratedValue( ingo@2842: strategy = GenerationType.SEQUENCE, ingo@2842: generator = "SEQUENCE_WATERLEVEL_VALUES_ID_SEQ") ingo@2842: @Column(name = "id") ingo@2842: public Integer getId() { ingo@2842: return id; ingo@2842: } ingo@2842: ingo@2842: public void setId(Integer id) { ingo@2842: this.id = id; ingo@2842: } ingo@2842: ingo@2842: @OneToOne ingo@2842: @JoinColumn(name = "waterlevel_q_range_id" ) ingo@2845: public WaterlevelQRange getQrange() { ingo@2845: return qrange; ingo@2842: } ingo@2842: ingo@2845: public void setQrange(WaterlevelQRange qrange) { ingo@2845: this.qrange = qrange; ingo@2842: } ingo@2842: ingo@2842: @Column(name = "station") ingo@2842: public Double getStation() { ingo@2842: return station; ingo@2842: } ingo@2842: ingo@2842: public void setStation(Double station) { ingo@2842: this.station = station; ingo@2842: } ingo@2842: ingo@2842: @Column(name = "w") ingo@2842: public Double getW() { ingo@2842: return w; ingo@2842: } ingo@2842: ingo@2842: public void setW(Double w) { ingo@2842: this.w = w; ingo@2842: } ingo@2842: } ingo@2842: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :