Mercurial > dive4elements > river
annotate flys-backend/src/main/java/de/intevation/flys/model/Floodmaps.java @ 2829:4074777afcfa
Added MINFO specific relations for flow velocity measurements.
flys-backend/trunk@4246 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 17 Apr 2012 10:16:21 +0000 |
parents | 3fdac7b43dac |
children | 8649e4ed01ec |
rev | line source |
---|---|
2799
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.model; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
3 import java.io.Serializable; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 import java.math.BigDecimal; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 import java.util.List; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 import javax.persistence.Column; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 import javax.persistence.Entity; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 import javax.persistence.Id; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 import javax.persistence.JoinColumn; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 import javax.persistence.OneToOne; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 import javax.persistence.Table; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 import org.hibernate.Session; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 import org.hibernate.Query; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 import org.hibernate.annotations.Type; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 |
2802
3fdac7b43dac
Registered missing Floodmaps and set its Geometry type to Geometry.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2799
diff
changeset
|
18 import com.vividsolutions.jts.geom.Geometry; |
2799
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 import com.vividsolutions.jts.geom.MultiPolygon; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 import de.intevation.flys.backend.SessionHolder; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 @Entity |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 @Table(name = "floodmaps") |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 public class Floodmaps |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 implements Serializable |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 private Integer id; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 private River river; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 private String name; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 private Integer kind; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 private Integer count; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 private BigDecimal diff; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 private BigDecimal area; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 private BigDecimal perimeter; |
2802
3fdac7b43dac
Registered missing Floodmaps and set its Geometry type to Geometry.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2799
diff
changeset
|
37 private Geometry geom; |
2799
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 public Floodmaps() { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
40 } |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
42 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 @Id |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
44 @Column(name = "id") |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
45 public Integer getId() { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 return id; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
47 } |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
48 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
49 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
50 public void setId(Integer id) { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
51 this.id = id; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
52 } |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
53 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
54 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
55 @OneToOne |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 @JoinColumn(name = "river_id") |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
57 public River getRiver() { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
58 return river; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 } |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 public void setRiver(River river) { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 this.river = river; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 } |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
65 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
66 |
2802
3fdac7b43dac
Registered missing Floodmaps and set its Geometry type to Geometry.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2799
diff
changeset
|
67 @Column(name = "name") |
2799
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
68 public String getName() { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
69 return name; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
70 } |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
71 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
72 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
73 public void setName(String name) { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
74 this.name = name; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
75 } |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
76 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
77 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
78 @Column(name = "kind") |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
79 public Integer getKind() { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
80 return kind; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
81 } |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
82 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
83 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
84 public void setKind(Integer kind) { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
85 this.kind = kind; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
86 } |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
87 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
88 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
89 @Column(name = "count") |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
90 public Integer getCount() { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
91 return count; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
92 } |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
93 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
94 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
95 public void setCount(Integer count) { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
96 this.count = count; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
97 } |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
98 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
99 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
100 @Column(name = "diff") |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
101 public BigDecimal getDiff() { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
102 return diff; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
103 } |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
104 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
105 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
106 public void setDiff(BigDecimal diff) { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
107 this.diff = diff; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
108 } |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
109 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
110 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
111 @Column(name = "area") |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
112 public BigDecimal getArea() { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
113 return area; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
114 } |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
115 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
116 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
117 public void setArea(BigDecimal area) { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
118 this.area = area; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
119 } |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
120 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
121 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
122 @Column(name = "perimeter") |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
123 public BigDecimal getPerimeter() { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
124 return perimeter; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
125 } |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
126 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
127 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
128 public void setPerimeter(BigDecimal perimeter) { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
129 this.perimeter = perimeter; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
130 } |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
131 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
132 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
133 @Column(name = "geom") |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
134 @Type(type = "org.hibernatespatial.GeometryUserType") |
2802
3fdac7b43dac
Registered missing Floodmaps and set its Geometry type to Geometry.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2799
diff
changeset
|
135 public Geometry getGeom() { |
2799
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
136 return geom; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
137 } |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
138 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
139 |
2802
3fdac7b43dac
Registered missing Floodmaps and set its Geometry type to Geometry.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2799
diff
changeset
|
140 public void setGeom(Geometry geom) { |
2799
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
141 this.geom = geom; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
142 } |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
143 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
144 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
145 public static List<Floodmaps> getFloodmaps(int riverId, String name) { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
146 Session session = SessionHolder.HOLDER.get(); |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
147 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
148 Query query = session.createQuery( |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
149 "from Floodmaps where river.id =:river_id AND name =:name"); |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
150 query.setParameter("river_id", riverId); |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
151 query.setParameter("name", name); |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
152 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
153 return query.list(); |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
154 } |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
155 } |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
156 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |