ingo@2825: package de.intevation.flys.model; ingo@2825: ingo@2825: import java.io.Serializable; ingo@2825: import java.math.BigDecimal; ingo@2825: ingo@2825: import javax.persistence.Entity; ingo@2825: import javax.persistence.Id; ingo@2825: import javax.persistence.Table; ingo@2825: import javax.persistence.GeneratedValue; ingo@2825: import javax.persistence.Column; ingo@2825: import javax.persistence.SequenceGenerator; ingo@2825: import javax.persistence.GenerationType; ingo@2825: import javax.persistence.JoinColumn; ingo@2825: import javax.persistence.OneToOne; ingo@2825: ingo@2825: import org.apache.log4j.Logger; ingo@2825: ingo@2825: ingo@2825: @Entity ingo@2825: @Table(name = "discharge_zone") ingo@2825: public class DischargeZone ingo@2825: implements Serializable ingo@2825: { ingo@2825: private static Logger logger = Logger.getLogger(DischargeZone.class); ingo@2825: ingo@2825: ingo@2825: private Integer id; ingo@2825: ingo@2825: private River river; ingo@2825: ingo@2833: private String gaugeName; ingo@2825: ingo@2833: private BigDecimal value; ingo@2825: ingo@2833: private String lowerDischarge; ingo@2833: private String upperDischarge; ingo@2825: ingo@2825: ingo@2825: public DischargeZone() { ingo@2825: } ingo@2825: ingo@2825: ingo@2825: public DischargeZone( ingo@2833: River river, ingo@2833: String gaugeName, ingo@2833: BigDecimal value, ingo@2833: String lowerDischarge, ingo@2833: String upperDischarge ingo@2825: ) { ingo@2833: this.river = river; ingo@2833: this.gaugeName = gaugeName; ingo@2833: this.value = value; ingo@2833: this.lowerDischarge = lowerDischarge; ingo@2833: this.upperDischarge = upperDischarge; ingo@2825: } ingo@2825: ingo@2825: @Id ingo@2825: @SequenceGenerator( ingo@2825: name = "SEQUENCE_DISCHARGE_ZONE_ID_SEQ", ingo@2825: sequenceName = "DISCHARGE_ZONE_ID_SEQ", ingo@2825: allocationSize = 1) ingo@2825: @GeneratedValue( ingo@2825: strategy = GenerationType.SEQUENCE, ingo@2825: generator = "SEQUENCE_DISCHARGE_ZONE_ID_SEQ") ingo@2825: @Column(name = "id") ingo@2825: public Integer getId() { ingo@2825: return id; ingo@2825: } ingo@2825: ingo@2825: public void setId(Integer id) { ingo@2825: this.id = id; ingo@2825: } ingo@2825: ingo@2825: @OneToOne ingo@2825: @JoinColumn(name = "river_id" ) ingo@2825: public River getRiver() { ingo@2825: return river; ingo@2825: } ingo@2825: ingo@2825: public void setRiver(River river) { ingo@2825: this.river = river; ingo@2825: } ingo@2825: ingo@2833: @Column(name = "value") ingo@2833: public BigDecimal getValue() { ingo@2833: return value; ingo@2825: } ingo@2825: ingo@2833: public void setValue(BigDecimal value) { ingo@2833: this.value = value; ingo@2825: } ingo@2825: ingo@2825: @Column(name = "gauge_name") ingo@2825: public String getGaugeName() { ingo@2825: return gaugeName; ingo@2825: } ingo@2825: ingo@2825: public void setGaugeName(String gaugeName) { ingo@2825: this.gaugeName = gaugeName; ingo@2825: } ingo@2825: ingo@2833: @Column(name = "lower_discharge") ingo@2833: public String getLowerDischarge() { ingo@2833: return lowerDischarge; ingo@2825: } ingo@2825: ingo@2833: public void setLowerDischarge(String lowerDischarge) { ingo@2833: this.lowerDischarge = lowerDischarge; ingo@2825: } ingo@2825: ingo@2833: @Column(name = "upper_discharge") ingo@2833: public String getUpperDischarge() { ingo@2833: return upperDischarge; ingo@2825: } ingo@2825: ingo@2833: public void setUpperDischarge(String upperDischarge) { ingo@2833: this.upperDischarge = upperDischarge; ingo@2825: } ingo@2825: } ingo@2825: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :