comparison backend/src/main/java/org/dive4elements/river/model/uinfo/SalixValue.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
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.uinfo;
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 salix_values
28 *
29 * @author Matthias Schäfer
30 *
31 */
32 @Entity
33 @Table(name = "salix_values")
34 public class SalixValue implements Serializable {
35
36 /***** FIELDS *****/
37
38 private static final long serialVersionUID = 7775536956084391338L;
39
40 private Integer id;
41
42 private Salix salix;
43
44 private Double station;
45
46 private Double factor;
47
48 private Double mnw_mw_diff;
49
50
51 /***** CONSTRUCTORS *****/
52
53 public SalixValue() {
54 }
55
56 public SalixValue(final Salix salix, final Double station, final Double factor, final Double mnw_mw_diff) {
57 this.salix = salix;
58 this.station = station;
59 this.factor = factor;
60 this.mnw_mw_diff = mnw_mw_diff;
61 }
62
63 /**
64 * Constructor with primitive parameter types
65 */
66 public SalixValue(final Salix salix, final double km, final SalixRank salixType, final double factor, final double mnw_mw_diff) {
67 this(salix, Double.valueOf(km), Double.valueOf(factor), Double.valueOf(mnw_mw_diff));
68 }
69
70
71 /***** METHODS *****/
72
73 @Id
74 @SequenceGenerator(name = "SEQUENCE_SALIX_VALUE_ID_SEQ", sequenceName = "SALIX_VALUES_ID_SEQ", allocationSize = 1)
75 @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQUENCE_SALIX_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 = "salix_id")
87 public Salix getSalix() {
88 return this.salix;
89 }
90
91 public void setSalix(final Salix salix) {
92 this.salix = salix;
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 = "factor")
105 public Double getFactor() {
106 return this.factor;
107 }
108
109 public void setFactor(final Double factor) {
110 this.factor = factor;
111 }
112
113 @Column(name = "mnw_mw_diff")
114 public Double getMnwMwDiff() {
115 return this.mnw_mw_diff;
116 }
117
118 public void setMnwMwDiff(final Double mnw_mw_diff) {
119 this.mnw_mw_diff = mnw_mw_diff;
120 }
121 }

http://dive4elements.wald.intevation.org