comparison backend/src/main/java/org/dive4elements/river/model/sinfo/FlowDepthValue.java @ 8971:50416a0df385

Importer for the Schifffahrt (S-INFO) and Oekologie (U-INFO) files
author mschaefer
date Tue, 03 Apr 2018 10:18:30 +0200
parents
children c16e90a0baf7
comparison
equal deleted inserted replaced
8970:da5dc7446652 8971:50416a0df385
1 /* Copyright (C) 2017 by Bundesanstalt für Gewässerkunde
2 * Software engineering by
3 * Björnsen Beratende Ingenieure GmbH
4 * Dr. Schumacher Ingenieurbüro für Wasser und Umwelt
5 *
6 * This file is Free Software under the GNU AGPL (>=v3)
7 * and comes with ABSOLUTELY NO WARRANTY! Check out the
8 * documentation coming with Dive4Elements River for details.
9 */
10
11 package org.dive4elements.river.model.sinfo;
12
13 import java.io.Serializable;
14
15 import javax.persistence.Column;
16 import javax.persistence.Entity;
17 import javax.persistence.GeneratedValue;
18 import javax.persistence.GenerationType;
19 import javax.persistence.Id;
20 import javax.persistence.JoinColumn;
21 import javax.persistence.OneToOne;
22 import javax.persistence.SequenceGenerator;
23 import javax.persistence.Table;
24
25
26 /**
27 * Hibernate binding for the DB table flow_depth_values
28 *
29 * @author Matthias Schäfer
30 *
31 */
32 @Entity
33 @Table(name = "flow_depth_values")
34 public class FlowDepthValue implements Serializable {
35
36 /***** FIELDS *****/
37
38 private static final long serialVersionUID = -7465899199734466657L;
39
40 private Integer id;
41
42 private FlowDepthColumn flowDepthColumn;
43
44 private Double station;
45
46 /**
47 * Flow depth in m
48 */
49 private Double depth;
50
51
52 /***** CONSTRUCTORS *****/
53
54 public FlowDepthValue() {
55 }
56
57 public FlowDepthValue(final FlowDepthColumn flowDepthColumn, final Double station, final Double depth) {
58 this.flowDepthColumn = flowDepthColumn;
59 this.station = station;
60 this.depth = depth;
61 }
62
63 /**
64 * Constructor with primitive parameter types
65 */
66 public FlowDepthValue(final FlowDepthColumn flow_depthColumn, final double km, final double depth) {
67 this(flow_depthColumn, Double.valueOf(km), Double.valueOf(depth));
68 }
69
70
71 /***** METHODS *****/
72
73 @Id
74 @SequenceGenerator(name = "SEQUENCE_FLOW_DEPTH_VALUE_ID_SEQ", sequenceName = "FLOW_DEPTH_VALUES_ID_SEQ", allocationSize = 1)
75 @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQUENCE_FLOW_DEPTH_VALUE_ID_SEQ")
76 @Column(name = "id")
77 public Integer getId() {
78 return this.id;
79 }
80
81 public void setId(final Integer id) {
82 this.id = id;
83 }
84
85 @OneToOne
86 @JoinColumn(name = "flow_depth_column_id")
87 public FlowDepthColumn getFlowDepthColumn() {
88 return this.flowDepthColumn;
89 }
90
91 public void setFlowDepthColumn(final FlowDepthColumn flow_depth) {
92 this.flowDepthColumn = flow_depth;
93 }
94
95 @Column(name = "station")
96 public Double getStation() {
97 return this.station;
98 }
99
100 public void setStation(final Double station) {
101 this.station = station;
102 }
103
104 @Column(name = "depth")
105 public Double getDepth() {
106 return this.depth;
107 }
108
109 public void setDepth(final Double depth) {
110 this.depth = depth;
111 }
112 }

http://dive4elements.wald.intevation.org