comparison 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
comparison
equal deleted inserted replaced
8954:183f42641ab6 8955:798d9dcbccdd
45 private Double station; 45 private Double station;
46 private Double height; 46 private Double height;
47 private Double uncertainty; 47 private Double uncertainty;
48 private Double dataGap; 48 private Double dataGap;
49 private Double soundingWidth; 49 private Double soundingWidth;
50 private Double minHeight;
51 private Double maxHeight;
50 52
51 53
52 public BedHeightValue() { 54 public BedHeightValue() {
53 } 55 }
54 56
55 public BedHeightValue( 57 public BedHeightValue(final BedHeight bedHeight, final Double station, final Double height, final Double uncertainty, final Double dataGap,
56 BedHeight bedHeight, 58 final Double soundingWidth, final Double minHeight, final Double maxHeight) {
57 Double station,
58 Double height,
59 Double uncertainty,
60 Double dataGap,
61 Double soundingWidth
62 ) {
63 this.bedHeight = bedHeight; 59 this.bedHeight = bedHeight;
64 this.station = station; 60 this.station = station;
65 this.height = height; 61 this.height = height;
66 this.uncertainty = uncertainty; 62 this.uncertainty = uncertainty;
67 this.dataGap = dataGap; 63 this.dataGap = dataGap;
68 this.soundingWidth = soundingWidth; 64 this.soundingWidth = soundingWidth;
65 this.minHeight = minHeight;
66 this.maxHeight = maxHeight;
69 } 67 }
70 68
71 @Id 69 @Id
72 @SequenceGenerator( 70 @SequenceGenerator(name = "SEQUENCE_BED_HEIGHT_VALUE_ID_SEQ", sequenceName = "BED_HEIGHT_VALUES_ID_SEQ", allocationSize = 1)
73 name = "SEQUENCE_BED_HEIGHT_VALUE_ID_SEQ", 71 @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQUENCE_BED_HEIGHT_VALUE_ID_SEQ")
74 sequenceName = "BED_HEIGHT_VALUES_ID_SEQ",
75 allocationSize = 1)
76 @GeneratedValue(
77 strategy = GenerationType.SEQUENCE,
78 generator = "SEQUENCE_BED_HEIGHT_VALUE_ID_SEQ")
79 @Column(name = "id") 72 @Column(name = "id")
80 public Integer getId() { 73 public Integer getId() {
81 return id; 74 return this.id;
82 } 75 }
83 76
84 public void setId(Integer id) { 77 public void setId(final Integer id) {
85 this.id = id; 78 this.id = id;
86 } 79 }
87 80
88 @OneToOne 81 @OneToOne
89 @JoinColumn(name = "bed_height_id") 82 @JoinColumn(name = "bed_height_id")
90 public BedHeight getBedHeight() { 83 public BedHeight getBedHeight() {
91 return bedHeight; 84 return this.bedHeight;
92 } 85 }
93 86
94 public void setBedHeight(BedHeight bedHeight) { 87 public void setBedHeight(final BedHeight bedHeight) {
95 this.bedHeight = bedHeight; 88 this.bedHeight = bedHeight;
96 } 89 }
97 90
98 @Column(name = "station") 91 @Column(name = "station")
99 public Double getStation() { 92 public Double getStation() {
100 return station; 93 return this.station;
101 } 94 }
102 95
103 public void setStation(Double station) { 96 public void setStation(final Double station) {
104 this.station = station; 97 this.station = station;
105 } 98 }
106 99
107 @Column(name = "height") 100 @Column(name = "height")
108 public Double getHeight() { 101 public Double getHeight() {
109 return height; 102 return this.height;
110 } 103 }
111 104
112 public void setHeight(Double height) { 105 public void setHeight(final Double height) {
113 this.height = height; 106 this.height = height;
114 } 107 }
115 108
116 @Column(name="uncertainty") 109 @Column(name="uncertainty")
117 public Double getUncertainty() { 110 public Double getUncertainty() {
118 return uncertainty; 111 return this.uncertainty;
119 } 112 }
120 113
121 public void setUncertainty(Double uncertainty) { 114 public void setUncertainty(final Double uncertainty) {
122 this.uncertainty = uncertainty; 115 this.uncertainty = uncertainty;
123 } 116 }
124 117
125 @Column(name="data_gap") 118 @Column(name="data_gap")
126 public Double getDataGap() { 119 public Double getDataGap() {
127 return dataGap; 120 return this.dataGap;
128 } 121 }
129 122
130 public void setDataGap(Double dataGap) { 123 public void setDataGap(final Double dataGap) {
131 this.dataGap = dataGap; 124 this.dataGap = dataGap;
132 } 125 }
133 126
134 @Column(name="sounding_width") 127 @Column(name="sounding_width")
135 public Double getSoundingWidth() { 128 public Double getSoundingWidth() {
136 return soundingWidth; 129 return this.soundingWidth;
137 } 130 }
138 131
139 public void setSoundingWidth(Double soundingWidth) { 132 public void setSoundingWidth(final Double soundingWidth) {
140 this.soundingWidth = soundingWidth; 133 this.soundingWidth = soundingWidth;
141 } 134 }
135
136 @Column(name = "min_height")
137 public Double getMinHeight() {
138 return this.minHeight;
139 }
140
141 public void setMinHeight(final Double minHeight) {
142 this.minHeight = minHeight;
143 }
144
145 @Column(name = "max_height")
146 public Double getMaxHeight() {
147 return this.maxHeight;
148 }
149
150 public void setMaxHeight(final Double maxHeight) {
151 this.maxHeight = maxHeight;
152 }
153
142 154
143 public static List<BedHeightValue> getBedHeightValues( 155 public static List<BedHeightValue> getBedHeightValues(
144 BedHeight single) { 156 BedHeight single) {
145 Session session = SessionHolder.HOLDER.get(); 157 Session session = SessionHolder.HOLDER.get();
146 158

http://dive4elements.wald.intevation.org