teichmann@8026: /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde teichmann@8026: * Software engineering by Intevation GmbH teichmann@8026: * teichmann@8026: * This file is Free Software under the GNU AGPL (>=v3) teichmann@8026: * and comes with ABSOLUTELY NO WARRANTY! Check out the teichmann@8026: * documentation coming with Dive4Elements River for details. teichmann@8026: */ teichmann@8026: package org.dive4elements.river.model; teichmann@8026: teichmann@8026: import java.io.Serializable; teichmann@8026: teichmann@8026: import javax.persistence.Column; teichmann@8026: import javax.persistence.Entity; teichmann@8026: import javax.persistence.GeneratedValue; teichmann@8026: import javax.persistence.GenerationType; teichmann@8026: import javax.persistence.Id; teichmann@8026: import javax.persistence.JoinColumn; teichmann@8026: import javax.persistence.OneToOne; teichmann@8026: import javax.persistence.SequenceGenerator; teichmann@8026: import javax.persistence.Table; teichmann@8026: teichmann@8026: @Entity tom@8056: @Table(name = "sediment_load_values") teichmann@8026: public class SedimentLoadValue teichmann@8026: implements Serializable teichmann@8026: { teichmann@8026: private Integer id; teichmann@8026: teichmann@8026: private SedimentLoad sedimentLoad; teichmann@8026: teichmann@8026: private MeasurementStation measurementStation; teichmann@8026: teichmann@8026: private Double value; teichmann@8026: teichmann@8026: public SedimentLoadValue() { teichmann@8026: } teichmann@8026: teichmann@8028: public SedimentLoadValue( teichmann@8028: SedimentLoad sedimentLoad, teichmann@8028: MeasurementStation measurementStation, teichmann@8028: Double value teichmann@8028: ) { teichmann@8028: this.sedimentLoad = sedimentLoad; teichmann@8028: this.measurementStation = measurementStation; teichmann@8028: this.value = value; teichmann@8028: } teichmann@8028: teichmann@8026: @Id teichmann@8026: @SequenceGenerator( teichmann@8026: name = "SEQUENCE_SEDIMENT_LOAD_VALUES_ID_SEQ", teichmann@8026: sequenceName = "SEDIMENT_LOAD_VALUES_ID_SEQ", teichmann@8026: allocationSize = 1) teichmann@8026: @GeneratedValue( teichmann@8026: strategy = GenerationType.SEQUENCE, teichmann@8026: generator = "SEQUENCE_SEDIMENT_LOAD_VALUES_ID_SEQ") teichmann@8026: @Column(name = "id") teichmann@8026: public Integer getId() { teichmann@8026: return id; teichmann@8026: } teichmann@8026: teichmann@8026: public void setId(Integer id) { teichmann@8026: this.id = id; teichmann@8026: } teichmann@8026: teichmann@8026: @OneToOne teichmann@8026: @JoinColumn(name = "sediment_load_id") teichmann@8026: public SedimentLoad getSedimentLoad() { teichmann@8026: return sedimentLoad; teichmann@8026: } teichmann@8026: teichmann@8026: public void setSedimentLoad(SedimentLoad sedimentLoad) { teichmann@8026: this.sedimentLoad = sedimentLoad; teichmann@8026: } teichmann@8026: teichmann@8026: @OneToOne teichmann@8026: @JoinColumn(name = "measurement_station_id") teichmann@8026: public MeasurementStation getMeasurementStation() { teichmann@8026: return measurementStation; teichmann@8026: } teichmann@8026: teichmann@8026: public void setMeasurementStation(MeasurementStation measurementStation) { teichmann@8026: this.measurementStation = measurementStation; teichmann@8026: } teichmann@8026: teichmann@8026: @Column(name = "value") teichmann@8026: public Double getValue() { teichmann@8026: return value; teichmann@8026: } teichmann@8026: teichmann@8026: public void setValue(Double value) { teichmann@8026: this.value = value; teichmann@8026: } teichmann@8026: } teichmann@8026: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :