ingo@2837: package de.intevation.flys.model; ingo@2837: ingo@2837: import java.io.Serializable; ingo@2837: ingo@2837: import javax.persistence.Entity; ingo@2837: import javax.persistence.Id; ingo@2837: import javax.persistence.Table; ingo@2837: import javax.persistence.GeneratedValue; ingo@2837: import javax.persistence.Column; ingo@2837: import javax.persistence.SequenceGenerator; ingo@2837: import javax.persistence.GenerationType; ingo@2837: import javax.persistence.JoinColumn; ingo@2837: import javax.persistence.OneToOne; ingo@2837: ingo@2837: import org.apache.log4j.Logger; ingo@2837: ingo@2837: ingo@2837: @Entity ingo@2837: @Table(name = "sediment_yield_values") ingo@2837: public class SedimentYieldValue ingo@2837: implements Serializable ingo@2837: { ingo@2837: private static Logger logger = Logger.getLogger(SedimentYieldValue.class); ingo@2837: ingo@2837: private Integer id; ingo@2837: ingo@2837: private SedimentYield sedimentYield; ingo@2837: ingo@2837: private Double station; ingo@2837: private Double value; ingo@2837: ingo@2837: private Unit unit; ingo@2837: ingo@2837: ingo@2837: public SedimentYieldValue() { ingo@2837: } ingo@2837: ingo@2837: public SedimentYieldValue( ingo@2837: SedimentYield sedimentYield, ingo@2837: Double station, ingo@2837: Double value ingo@2837: ) { ingo@2837: this.sedimentYield = sedimentYield; ingo@2837: this.station = station; ingo@2837: this.value = value; ingo@2837: } ingo@2837: ingo@2837: @Id ingo@2837: @SequenceGenerator( ingo@2837: name = "SEQUENCE_SEDIMENT_YIELD_VALuES_ID_SEQ", ingo@2837: sequenceName = "SEDIMENT_YIELD_VALUES_ID_SEQ", ingo@2837: allocationSize = 1) ingo@2837: @GeneratedValue( ingo@2837: strategy = GenerationType.SEQUENCE, ingo@2837: generator = "SEQUENCE_SEDIMENT_YIELD_VALuES_ID_SEQ") ingo@2837: @Column(name = "id") ingo@2837: public Integer getId() { ingo@2837: return id; ingo@2837: } ingo@2837: ingo@2837: public void setId(Integer id) { ingo@2837: this.id = id; ingo@2837: } ingo@2837: ingo@2837: @OneToOne ingo@2837: @JoinColumn(name = "sediment_yield_id" ) ingo@2837: public SedimentYield getSedimentYield() { ingo@2837: return sedimentYield; ingo@2837: } ingo@2837: ingo@2837: public void setSedimentYield(SedimentYield sedimentYield) { ingo@2837: this.sedimentYield = sedimentYield; ingo@2837: } ingo@2837: ingo@2837: @Column(name="station") ingo@2837: public Double getStation() { ingo@2837: return station; ingo@2837: } ingo@2837: ingo@2837: public void setStation(Double station) { ingo@2837: this.station = station; ingo@2837: } ingo@2837: ingo@2837: @Column(name = "value") ingo@2837: public Double getValue() { ingo@2837: return value; ingo@2837: } ingo@2837: ingo@2837: public void setValue(Double value) { ingo@2837: this.value = value; ingo@2837: } ingo@2837: } ingo@2837: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :