Mercurial > dive4elements > river
annotate flys-backend/src/main/java/de/intevation/flys/model/Floodmaps.java @ 5818:a4ff4167be1e
Request feature info on all layers and show it as html if
the server does not return valid gml.
Non queryable layers produce an error message when the request
fails. This is good enough
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 24 Apr 2013 17:33:27 +0200 |
parents | 8649e4ed01ec |
children |
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 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 import de.intevation.flys.backend.SessionHolder; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 |
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 @Entity |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 @Table(name = "floodmaps") |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 public class Floodmaps |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 implements Serializable |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 private Integer id; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 private River river; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 private String name; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 private Integer kind; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 private Integer count; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 private BigDecimal diff; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 private BigDecimal area; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 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
|
36 private Geometry geom; |
2799
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 public Floodmaps() { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 } |
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 @Id |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 @Column(name = "id") |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
44 public Integer getId() { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
45 return id; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 } |
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 public void setId(Integer id) { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
50 this.id = id; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
51 } |
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 @OneToOne |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
55 @JoinColumn(name = "river_id") |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 public River getRiver() { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
57 return river; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
58 } |
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 public void setRiver(River river) { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 this.river = river; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 } |
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 |
2802
3fdac7b43dac
Registered missing Floodmaps and set its Geometry type to Geometry.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2799
diff
changeset
|
66 @Column(name = "name") |
2799
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
67 public String getName() { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
68 return name; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
69 } |
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 public void setName(String name) { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
73 this.name = name; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
74 } |
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 @Column(name = "kind") |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
78 public Integer getKind() { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
79 return kind; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
80 } |
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 public void setKind(Integer kind) { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
84 this.kind = kind; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
85 } |
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 @Column(name = "count") |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
89 public Integer getCount() { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
90 return count; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
91 } |
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 public void setCount(Integer count) { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
95 this.count = count; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
96 } |
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 @Column(name = "diff") |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
100 public BigDecimal getDiff() { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
101 return diff; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
102 } |
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 public void setDiff(BigDecimal diff) { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
106 this.diff = diff; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
107 } |
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 @Column(name = "area") |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
111 public BigDecimal getArea() { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
112 return area; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
113 } |
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 public void setArea(BigDecimal area) { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
117 this.area = area; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
118 } |
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 @Column(name = "perimeter") |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
122 public BigDecimal getPerimeter() { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
123 return perimeter; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
124 } |
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 public void setPerimeter(BigDecimal perimeter) { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
128 this.perimeter = perimeter; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
129 } |
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 @Column(name = "geom") |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
133 @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
|
134 public Geometry getGeom() { |
2799
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
135 return geom; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
136 } |
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 |
2802
3fdac7b43dac
Registered missing Floodmaps and set its Geometry type to Geometry.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
2799
diff
changeset
|
139 public void setGeom(Geometry geom) { |
2799
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
140 this.geom = geom; |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
141 } |
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 public static List<Floodmaps> getFloodmaps(int riverId, String name) { |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
145 Session session = SessionHolder.HOLDER.get(); |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
146 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
147 Query query = session.createQuery( |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
148 "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
|
149 query.setParameter("river_id", riverId); |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
150 query.setParameter("name", name); |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
151 |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
152 return query.list(); |
501f00e355eb
Added model class for 'floodmaps'.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
153 } |
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 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |