comparison backend/src/main/java/org/dive4elements/river/model/sinfo/TkhValue.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 6e5ff436febe
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 tkh_values
28 *
29 * @author Matthias Schäfer
30 *
31 */
32 @Entity
33 @Table(name = "tkh_values")
34 public class TkhValue implements Serializable {
35
36 /***** FIELDS *****/
37
38 private static final long serialVersionUID = 4514054828340199384L;
39
40 private Integer id;
41
42 private TkhColumn tkhColumn;
43
44 private Double station;
45
46 /**
47 * TKH in m
48 */
49 private Double tkheight;
50
51
52 /***** CONSTRUCTORS *****/
53
54 public TkhValue() {
55 }
56
57 public TkhValue(final TkhColumn tkhColumn, final Double station, final Double tkheight) {
58 this.tkhColumn = tkhColumn;
59 this.station = station;
60 this.tkheight = tkheight;
61 }
62
63 /**
64 * Constructor with primitive parameter types
65 */
66 public TkhValue(final TkhColumn tkhColumn, final double km, final double tkheight) {
67 this(tkhColumn, Double.valueOf(km), Double.valueOf(tkheight));
68 }
69
70
71 /***** METHODS *****/
72
73 @Id
74 @SequenceGenerator(name = "SEQUENCE_TKH_VALUE_ID_SEQ", sequenceName = "TKH_VALUES_ID_SEQ", allocationSize = 1)
75 @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQUENCE_TKH_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 = "tkh_column_id")
87 public TkhColumn getTkhColumn() {
88 return this.tkhColumn;
89 }
90
91 public void setTkhColumn(final TkhColumn tkh) {
92 this.tkhColumn = tkh;
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 = "tkheight")
105 public Double getTkheight() {
106 return this.tkheight;
107 }
108
109 public void setTkheight(final Double tkheight) {
110 this.tkheight = tkheight;
111 }
112 }

http://dive4elements.wald.intevation.org