ingo@4193: package de.intevation.flys.model; ingo@4193: ingo@4193: import javax.persistence.Column; ingo@4193: import javax.persistence.Entity; ingo@4193: import javax.persistence.GeneratedValue; ingo@4193: import javax.persistence.GenerationType; ingo@4193: import javax.persistence.Id; ingo@4193: import javax.persistence.JoinColumn; ingo@4193: import javax.persistence.OneToOne; ingo@4193: import javax.persistence.SequenceGenerator; ingo@4193: import javax.persistence.Table; ingo@4193: ingo@4193: ingo@4193: @Entity ingo@4193: @Table(name = "measurement_station") ingo@4193: public class MeasurementStation { ingo@4193: ingo@4193: private Integer id; ingo@4193: ingo@4193: private String name; ingo@4193: private String measurementType; ingo@4193: private String riverside; ingo@4193: private String operator; ingo@4193: private String comment; ingo@4193: ingo@4193: private Double station; ingo@4193: private Range range; ingo@4193: ingo@4193: private River river; ingo@4193: ingo@4193: private Gauge gauge; ingo@4193: ingo@4193: private TimeInterval observationTimerange; ingo@4193: ingo@4193: public MeasurementStation(River river, String name, String measurementType, ingo@4193: String riverside, Double station, Range range, Gauge gauge, ingo@4193: TimeInterval observationTimerange, String operator, String comment) { ingo@4193: this.river = river; ingo@4193: this.name = name; ingo@4193: this.measurementType = measurementType; ingo@4193: this.riverside = riverside; ingo@4193: this.station = station; ingo@4193: this.range = range; ingo@4193: this.gauge = gauge; ingo@4193: this.observationTimerange = observationTimerange; ingo@4193: this.operator = operator; ingo@4193: this.comment = comment; ingo@4193: } ingo@4193: ingo@4193: @Id ingo@4193: @SequenceGenerator(name = "SEQ_MEASUREMENT_STATION_ID_SEQ", sequenceName = "MEASUREMENT_STATION_ID_SEQ", allocationSize = 1) ingo@4193: @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_MEASUREMENT_STATION_ID_SEQ") ingo@4193: @Column(name = "id") ingo@4193: public Integer getId() { ingo@4193: return id; ingo@4193: } ingo@4193: ingo@4193: public void setId(Integer id) { ingo@4193: this.id = id; ingo@4193: } ingo@4193: ingo@4193: @Column(name = "name") ingo@4193: public String getName() { ingo@4193: return name; ingo@4193: } ingo@4193: ingo@4193: public void setName(String name) { ingo@4193: this.name = name; ingo@4193: } ingo@4193: ingo@4193: @Column(name = "measurement_type") ingo@4193: public String getMeasurementType() { ingo@4193: return measurementType; ingo@4193: } ingo@4193: ingo@4193: public void setMeasurementType(String measurementType) { ingo@4193: this.measurementType = measurementType; ingo@4193: } ingo@4193: ingo@4193: @Column(name = "riverside") ingo@4193: public String getRiverside() { ingo@4193: return riverside; ingo@4193: } ingo@4193: ingo@4193: public void setRiverside(String riverside) { ingo@4193: this.riverside = riverside; ingo@4193: } ingo@4193: ingo@4193: @OneToOne ingo@4193: @JoinColumn(name = "river_id") ingo@4193: public River getRiver() { ingo@4193: return river; ingo@4193: } ingo@4193: ingo@4193: public void setRiver(River river) { ingo@4193: this.river = river; ingo@4193: } ingo@4193: ingo@4193: @OneToOne ingo@4193: @JoinColumn(name = "reference_gauge_id") ingo@4193: public Gauge getGauge() { ingo@4193: return gauge; ingo@4193: } ingo@4193: ingo@4193: public void setGauge(Gauge gauge) { ingo@4193: this.gauge = gauge; ingo@4193: } ingo@4193: ingo@4193: @Column(name = "station") ingo@4193: public Double getStation() { ingo@4193: return station; ingo@4193: } ingo@4193: ingo@4193: public void setStation(Double station) { ingo@4193: this.station = station; ingo@4193: } ingo@4193: ingo@4193: @OneToOne ingo@4193: @JoinColumn(name = "range_id") ingo@4193: public Range getRange() { ingo@4193: return range; ingo@4193: } ingo@4193: ingo@4193: public void setRange(Range range) { ingo@4193: this.range = range; ingo@4193: } ingo@4193: ingo@4193: @OneToOne ingo@4193: @JoinColumn(name = "observation_timerange_id") ingo@4193: public TimeInterval getObservationTimerange() { ingo@4193: return observationTimerange; ingo@4193: } ingo@4193: ingo@4193: public void setObservationTimerange(TimeInterval observationTimerange) { ingo@4193: this.observationTimerange = observationTimerange; ingo@4193: } ingo@4193: ingo@4193: @Column(name = "operator") ingo@4193: public String getOperator() { ingo@4193: return operator; ingo@4193: } ingo@4193: ingo@4193: public void setOperator(String operator) { ingo@4193: this.operator = operator; ingo@4193: } ingo@4193: ingo@4193: @Column(name = "comment") ingo@4193: public String getComment() { ingo@4193: return comment; ingo@4193: } ingo@4193: ingo@4193: public void setComment(String comment) { ingo@4193: this.comment = comment; ingo@4193: } ingo@4193: ingo@4193: }