Mercurial > dive4elements > river
diff backend/src/main/java/org/dive4elements/river/model/BedHeightValue.java @ 8955:798d9dcbccdd
BedHeightValue (bed_height_values) extended by two columns for minimum and maximum bed height
author | mschaefer |
---|---|
date | Mon, 19 Mar 2018 16:32:42 +0100 |
parents | ff27548d078c |
children | a0a0a7f912ab |
line wrap: on
line diff
--- a/backend/src/main/java/org/dive4elements/river/model/BedHeightValue.java Mon Mar 19 14:13:37 2018 +0100 +++ b/backend/src/main/java/org/dive4elements/river/model/BedHeightValue.java Mon Mar 19 16:32:42 2018 +0100 @@ -47,99 +47,111 @@ private Double uncertainty; private Double dataGap; private Double soundingWidth; + private Double minHeight; + private Double maxHeight; public BedHeightValue() { } - public BedHeightValue( - BedHeight bedHeight, - Double station, - Double height, - Double uncertainty, - Double dataGap, - Double soundingWidth - ) { + public BedHeightValue(final BedHeight bedHeight, final Double station, final Double height, final Double uncertainty, final Double dataGap, + final Double soundingWidth, final Double minHeight, final Double maxHeight) { this.bedHeight = bedHeight; this.station = station; this.height = height; this.uncertainty = uncertainty; this.dataGap = dataGap; this.soundingWidth = soundingWidth; + this.minHeight = minHeight; + this.maxHeight = maxHeight; } @Id - @SequenceGenerator( - name = "SEQUENCE_BED_HEIGHT_VALUE_ID_SEQ", - sequenceName = "BED_HEIGHT_VALUES_ID_SEQ", - allocationSize = 1) - @GeneratedValue( - strategy = GenerationType.SEQUENCE, - generator = "SEQUENCE_BED_HEIGHT_VALUE_ID_SEQ") + @SequenceGenerator(name = "SEQUENCE_BED_HEIGHT_VALUE_ID_SEQ", sequenceName = "BED_HEIGHT_VALUES_ID_SEQ", allocationSize = 1) + @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQUENCE_BED_HEIGHT_VALUE_ID_SEQ") @Column(name = "id") public Integer getId() { - return id; + return this.id; } - public void setId(Integer id) { + public void setId(final Integer id) { this.id = id; } @OneToOne @JoinColumn(name = "bed_height_id") public BedHeight getBedHeight() { - return bedHeight; + return this.bedHeight; } - public void setBedHeight(BedHeight bedHeight) { + public void setBedHeight(final BedHeight bedHeight) { this.bedHeight = bedHeight; } @Column(name = "station") public Double getStation() { - return station; + return this.station; } - public void setStation(Double station) { + public void setStation(final Double station) { this.station = station; } @Column(name = "height") public Double getHeight() { - return height; + return this.height; } - public void setHeight(Double height) { + public void setHeight(final Double height) { this.height = height; } @Column(name="uncertainty") public Double getUncertainty() { - return uncertainty; + return this.uncertainty; } - public void setUncertainty(Double uncertainty) { + public void setUncertainty(final Double uncertainty) { this.uncertainty = uncertainty; } @Column(name="data_gap") public Double getDataGap() { - return dataGap; + return this.dataGap; } - public void setDataGap(Double dataGap) { + public void setDataGap(final Double dataGap) { this.dataGap = dataGap; } @Column(name="sounding_width") public Double getSoundingWidth() { - return soundingWidth; + return this.soundingWidth; } - public void setSoundingWidth(Double soundingWidth) { + public void setSoundingWidth(final Double soundingWidth) { this.soundingWidth = soundingWidth; } + @Column(name = "min_height") + public Double getMinHeight() { + return this.minHeight; + } + + public void setMinHeight(final Double minHeight) { + this.minHeight = minHeight; + } + + @Column(name = "max_height") + public Double getMaxHeight() { + return this.maxHeight; + } + + public void setMaxHeight(final Double maxHeight) { + this.maxHeight = maxHeight; + } + + public static List<BedHeightValue> getBedHeightValues( BedHeight single) { Session session = SessionHolder.HOLDER.get();