Mercurial > dive4elements > river
comparison backend/src/main/java/org/dive4elements/river/model/uinfo/VegetationZone.java @ 9014:201817aa7b1c
Added the missing vegetation import classes
author | mschaefer |
---|---|
date | Wed, 18 Apr 2018 12:11:39 +0200 |
parents | |
children | 361de818f76e |
comparison
equal
deleted
inserted
replaced
9013:1fec0a06d833 | 9014:201817aa7b1c |
---|---|
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 vegetation_zone | |
28 * | |
29 * @author Matthias Schäfer | |
30 * | |
31 */ | |
32 @Entity | |
33 @Table(name = "vegetation_zone") | |
34 public class VegetationZone implements Serializable { | |
35 | |
36 /***** FIELDS *****/ | |
37 | |
38 private static final long serialVersionUID = -6579828019873800147L; | |
39 | |
40 private Integer id; | |
41 | |
42 private Vegetation vegetation; | |
43 | |
44 private VegetationType vegetationType; | |
45 | |
46 private Integer min_overflow_days; | |
47 | |
48 private Integer max_overflow_days; | |
49 | |
50 | |
51 /***** CONSTRUCTORS *****/ | |
52 | |
53 public VegetationZone() { | |
54 } | |
55 | |
56 public VegetationZone(final Vegetation vegetation, final VegetationType vegetationType, final Integer min_overflow_days, final Integer max_overflow_days) { | |
57 this.vegetation = vegetation; | |
58 this.vegetationType = vegetationType; | |
59 this.min_overflow_days = min_overflow_days; | |
60 this.max_overflow_days = max_overflow_days; | |
61 } | |
62 | |
63 | |
64 /***** METHODS *****/ | |
65 | |
66 @Id | |
67 @SequenceGenerator(name = "SEQUENCE_VEGETATION_ZONE_ID_SEQ", sequenceName = "VEGETATION_ZONE_ID_SEQ", allocationSize = 1) | |
68 @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQUENCE_VEGETATION_ZONE_ID_SEQ") | |
69 @Column(name = "id") | |
70 public Integer getId() { | |
71 return this.id; | |
72 } | |
73 | |
74 public void setId(final Integer id) { | |
75 this.id = id; | |
76 } | |
77 | |
78 @OneToOne | |
79 @JoinColumn(name = "vegetation_id") | |
80 public Vegetation getVegetation() { | |
81 return this.vegetation; | |
82 } | |
83 | |
84 public void setVegetation(final Vegetation vegetation) { | |
85 this.vegetation = vegetation; | |
86 } | |
87 | |
88 @OneToOne | |
89 @JoinColumn(name = "vegetation_type_id") | |
90 public VegetationType getVegetationType() { | |
91 return this.vegetationType; | |
92 } | |
93 | |
94 public void setVegetationType(final VegetationType vegetationType) { | |
95 this.vegetationType = vegetationType; | |
96 } | |
97 | |
98 @Column(name = "min_overflow_days") | |
99 public Integer getMin_overflow_days() { | |
100 return this.min_overflow_days; | |
101 } | |
102 | |
103 public void setMin_overflow_days(final Integer min_overflow_days) { | |
104 this.min_overflow_days = min_overflow_days; | |
105 } | |
106 | |
107 @Column(name = "max_overflow_days") | |
108 public Integer getMax_overflow_days() { | |
109 return this.max_overflow_days; | |
110 } | |
111 | |
112 public void setMax_overflow_days(final Integer max_overflow_days) { | |
113 this.max_overflow_days = max_overflow_days; | |
114 } | |
115 } |