teichmann@8025: /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde teichmann@8025: * Software engineering by Intevation GmbH teichmann@8025: * teichmann@8025: * This file is Free Software under the GNU AGPL (>=v3) teichmann@8025: * and comes with ABSOLUTELY NO WARRANTY! Check out the teichmann@8025: * documentation coming with Dive4Elements River for details. teichmann@8025: */ teichmann@8025: teichmann@8025: package org.dive4elements.river.model; teichmann@8025: teichmann@8025: import java.io.Serializable; teichmann@8025: teichmann@8025: import javax.persistence.Entity; teichmann@8025: import javax.persistence.Id; teichmann@8025: import javax.persistence.Table; teichmann@8025: import javax.persistence.GeneratedValue; teichmann@8025: import javax.persistence.Column; teichmann@8025: import javax.persistence.SequenceGenerator; teichmann@8025: import javax.persistence.GenerationType; teichmann@8025: import javax.persistence.JoinColumn; teichmann@8025: import javax.persistence.OneToOne; teichmann@8025: teichmann@8025: import org.apache.log4j.Logger; teichmann@8025: teichmann@8025: teichmann@8025: @Entity teichmann@8025: @Table(name = "sediment_yield_values") teichmann@8025: public class SedimentLoadLSValue teichmann@8025: implements Serializable teichmann@8025: { teichmann@8025: private static Logger logger = Logger.getLogger(SedimentLoadLSValue.class); teichmann@8025: teichmann@8025: private Integer id; teichmann@8025: teichmann@8025: private SedimentLoadLS sedimentYield; teichmann@8025: teichmann@8025: private Double station; teichmann@8025: private Double value; teichmann@8025: teichmann@8025: private Unit unit; teichmann@8025: teichmann@8025: teichmann@8025: public SedimentLoadLSValue() { teichmann@8025: } teichmann@8025: teichmann@8025: public SedimentLoadLSValue( teichmann@8025: SedimentLoadLS sedimentYield, teichmann@8025: Double station, teichmann@8025: Double value teichmann@8025: ) { teichmann@8025: this.sedimentYield = sedimentYield; teichmann@8025: this.station = station; teichmann@8025: this.value = value; teichmann@8025: } teichmann@8025: teichmann@8025: @Id teichmann@8025: @SequenceGenerator( teichmann@8025: name = "SEQUENCE_SEDIMENT_YIELD_VALuES_ID_SEQ", teichmann@8025: sequenceName = "SEDIMENT_YIELD_VALUES_ID_SEQ", teichmann@8025: allocationSize = 1) teichmann@8025: @GeneratedValue( teichmann@8025: strategy = GenerationType.SEQUENCE, teichmann@8025: generator = "SEQUENCE_SEDIMENT_YIELD_VALuES_ID_SEQ") teichmann@8025: @Column(name = "id") teichmann@8025: public Integer getId() { teichmann@8025: return id; teichmann@8025: } teichmann@8025: teichmann@8025: public void setId(Integer id) { teichmann@8025: this.id = id; teichmann@8025: } teichmann@8025: teichmann@8025: @OneToOne teichmann@8025: @JoinColumn(name = "sediment_yield_id" ) teichmann@8025: public SedimentLoadLS getSedimentYield() { teichmann@8025: return sedimentYield; teichmann@8025: } teichmann@8025: teichmann@8025: public void setSedimentYield(SedimentLoadLS sedimentYield) { teichmann@8025: this.sedimentYield = sedimentYield; teichmann@8025: } teichmann@8025: teichmann@8025: @Column(name="station") teichmann@8025: public Double getStation() { teichmann@8025: return station; teichmann@8025: } teichmann@8025: teichmann@8025: public void setStation(Double station) { teichmann@8025: this.station = station; teichmann@8025: } teichmann@8025: teichmann@8025: @Column(name = "value") teichmann@8025: public Double getValue() { teichmann@8025: return value; teichmann@8025: } teichmann@8025: teichmann@8025: public void setValue(Double value) { teichmann@8025: this.value = value; teichmann@8025: } teichmann@8025: } teichmann@8025: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :