Mercurial > dive4elements > river
comparison backend/src/main/java/org/dive4elements/river/model/sinfo/DepthEvolutionValue.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 | 1f63e9d3b0ec |
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 depth_evolution_values | |
28 * | |
29 * @author Matthias Schäfer | |
30 * | |
31 */ | |
32 @Entity | |
33 @Table(name = "depth_evolution_values") | |
34 public class DepthEvolutionValue implements Serializable { | |
35 | |
36 /***** FIELDS *****/ | |
37 | |
38 private static final long serialVersionUID = 3164888119107103560L; | |
39 | |
40 private Integer id; | |
41 | |
42 private DepthEvolution depth_evolution; | |
43 | |
44 private Double station; | |
45 | |
46 private Double total_change; | |
47 | |
48 private Double change_per_year; | |
49 | |
50 | |
51 /***** CONSTRUCTORS *****/ | |
52 | |
53 public DepthEvolutionValue() { | |
54 } | |
55 | |
56 public DepthEvolutionValue(final DepthEvolution depth_evolution, final Double station, final Double total_change, final Double change_per_year) { | |
57 this.depth_evolution = depth_evolution; | |
58 this.station = station; | |
59 this.total_change = total_change; | |
60 this.change_per_year = change_per_year; | |
61 } | |
62 | |
63 /** | |
64 * Parameter constructor with primitive parameter types | |
65 */ | |
66 public DepthEvolutionValue(final DepthEvolution depth_evolution, final double km, final double total_change, final double change_per_year) { | |
67 this(depth_evolution, Double.valueOf(km), Double.valueOf(total_change), Double.valueOf(change_per_year)); | |
68 } | |
69 | |
70 | |
71 /***** METHODS *****/ | |
72 | |
73 @Id | |
74 @SequenceGenerator(name = "SEQUENCE_DEPTH_EVOLUTION_VALUE_ID_SEQ", sequenceName = "DEPTH_EVOLUTION_VALUES_ID_SEQ", allocationSize = 1) | |
75 @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQUENCE_DEPTH_EVOLUTION_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 = "depth_evolution_id") | |
87 public DepthEvolution getDepthEvolution() { | |
88 return this.depth_evolution; | |
89 } | |
90 | |
91 public void setDepthEvolution(final DepthEvolution depth_evolution) { | |
92 this.depth_evolution = depth_evolution; | |
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 = "total_change") | |
105 public Double getTotal_change() { | |
106 return this.total_change; | |
107 } | |
108 | |
109 public void setTotal_change(final Double total_change) { | |
110 this.total_change = total_change; | |
111 } | |
112 | |
113 @Column(name = "change_per_year") | |
114 public Double getChange_per_year() { | |
115 return this.change_per_year; | |
116 } | |
117 | |
118 public void setChange_per_year(final Double change_per_year) { | |
119 this.change_per_year = change_per_year; | |
120 } | |
121 } |