Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/model/HydrBoundaryPoly.java @ 5379:61bf64b102bc mapgenfix
Merge with default branch
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Fri, 22 Mar 2013 11:25:54 +0100 |
parents | a2600507761e |
children | 87dab419b924 |
comparison
equal
deleted
inserted
replaced
5175:cfc5540a4eec | 5379:61bf64b102bc |
---|---|
3 import java.io.Serializable; | 3 import java.io.Serializable; |
4 import java.util.List; | 4 import java.util.List; |
5 | 5 |
6 import javax.persistence.Column; | 6 import javax.persistence.Column; |
7 import javax.persistence.Entity; | 7 import javax.persistence.Entity; |
8 import javax.persistence.GeneratedValue; | |
9 import javax.persistence.GenerationType; | |
8 import javax.persistence.Id; | 10 import javax.persistence.Id; |
9 import javax.persistence.JoinColumn; | 11 import javax.persistence.JoinColumn; |
10 import javax.persistence.OneToOne; | 12 import javax.persistence.OneToOne; |
11 import javax.persistence.Table; | 13 import javax.persistence.Table; |
14 import javax.persistence.SequenceGenerator; | |
12 | 15 |
13 import org.hibernate.Session; | 16 import org.hibernate.Session; |
14 import org.hibernate.Query; | 17 import org.hibernate.Query; |
15 import org.hibernate.annotations.Type; | 18 import org.hibernate.annotations.Type; |
16 | 19 |
26 { | 29 { |
27 private Integer id; | 30 private Integer id; |
28 private String name; | 31 private String name; |
29 private River river; | 32 private River river; |
30 private Geometry geom; | 33 private Geometry geom; |
34 private SectieKind sectie; | |
35 private SobekKind sobek; | |
36 private BoundaryKind kind; | |
31 | 37 |
32 public HydrBoundaryPoly() { | 38 public HydrBoundaryPoly() { |
33 } | 39 } |
34 | 40 |
35 | 41 |
36 @Id | 42 @Id |
43 @SequenceGenerator( | |
44 name = "SEQUENCE_HYDR_BOUNDARIES_POLY_ID_SEQ", | |
45 sequenceName = "HYDR_BOUNDARIES_POLY_ID_SEQ", | |
46 allocationSize = 1) | |
47 @GeneratedValue( | |
48 strategy = GenerationType.SEQUENCE, | |
49 generator = "SEQUENCE_HYDR_BOUNDARIES_POLY_ID_SEQ") | |
37 @Column(name = "id") | 50 @Column(name = "id") |
38 public Integer getId() { | 51 public Integer getId() { |
39 return id; | 52 return id; |
40 } | 53 } |
41 | 54 |
88 query.setParameter("river_id", riverId); | 101 query.setParameter("river_id", riverId); |
89 query.setParameter("name", name); | 102 query.setParameter("name", name); |
90 | 103 |
91 return query.list(); | 104 return query.list(); |
92 } | 105 } |
106 | |
107 /** | |
108 * Get sectie. | |
109 * | |
110 * @return sectie as SectieKind. | |
111 */ | |
112 @OneToOne | |
113 @JoinColumn(name = "sectie") | |
114 public SectieKind getSectie() | |
115 { | |
116 return sectie; | |
117 } | |
118 | |
119 /** | |
120 * Set sectie. | |
121 * | |
122 * @param sectie the value to set. | |
123 */ | |
124 public void setSectie(SectieKind sectie) | |
125 { | |
126 this.sectie = sectie; | |
127 } | |
128 | |
129 /** | |
130 * Get sobek. | |
131 * | |
132 * @return sobek as SobekKind. | |
133 */ | |
134 @OneToOne | |
135 @JoinColumn(name = "sobek") | |
136 public SobekKind getSobek() | |
137 { | |
138 return sobek; | |
139 } | |
140 | |
141 /** | |
142 * Set sobek. | |
143 * | |
144 * @param sobek the value to set. | |
145 */ | |
146 public void setSobek(SobekKind sobek) | |
147 { | |
148 this.sobek = sobek; | |
149 } | |
150 | |
151 /** | |
152 * Get kind. | |
153 * | |
154 * @return kind as BoundaryKind. | |
155 */ | |
156 @OneToOne | |
157 @JoinColumn(name = "kind") | |
158 public BoundaryKind getKind() | |
159 { | |
160 return kind; | |
161 } | |
162 | |
163 /** | |
164 * Set kind. | |
165 * | |
166 * @param kind the value to set. | |
167 */ | |
168 public void setKind(BoundaryKind kind) | |
169 { | |
170 this.kind = kind; | |
171 } | |
93 } | 172 } |
94 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 173 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |