annotate flys-backend/src/main/java/de/intevation/flys/model/Floodmark.java @ 5805:11bcace6f2fe

Doc.
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 24 Apr 2013 11:32:04 +0200
parents 559a009b3d72
children
rev   line source
5552
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.model;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
2
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
3 import java.io.Serializable;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
4 import java.math.BigDecimal;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
5 import java.util.List;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
6
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
7 import javax.persistence.Column;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
8 import javax.persistence.Entity;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
9 import javax.persistence.Id;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
10 import javax.persistence.JoinColumn;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
11 import javax.persistence.OneToOne;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
12 import javax.persistence.Table;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
13
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
14 import org.hibernate.Session;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
15 import org.hibernate.Query;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
16 import org.hibernate.annotations.Type;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
17
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
18 import com.vividsolutions.jts.geom.Point;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
19
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
20 import de.intevation.flys.backend.SessionHolder;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
21
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
22
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
23 @Entity
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
24 @Table(name = "flood_marks")
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
25 public class Floodmark
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
26 implements Serializable
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
27 {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
28 private Integer id;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
29 private River river;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
30 private Integer z;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
31 private Integer year;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
32 private BigDecimal km;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
33 private Point geom;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
34
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
35 public Floodmark() {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
36 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
37
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
38
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
39 @Id
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
40 @Column(name = "id")
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
41 public Integer getId() {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
42 return id;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
43 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
44
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
45
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
46 public void setId(Integer id) {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
47 this.id = id;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
48 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
49
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
50
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
51 @OneToOne
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
52 @JoinColumn(name = "river_id")
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
53 public River getRiver() {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
54 return river;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
55 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
56
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
57
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
58 public void setRiver(River river) {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
59 this.river = river;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
60 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
61
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
62
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
63 @Column(name = "z")
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
64 public Integer getZ() {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
65 return z;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
66 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
67
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
68
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
69 public void setZ(Integer z) {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
70 this.z = z;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
71 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
72
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
73
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
74 @Column(name = "year")
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
75 public Integer getYear() {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
76 return year;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
77 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
78
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
79
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
80 public void setYear(Integer year) {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
81 this.year = year;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
82 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
83
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
84
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
85 @Column(name = "km")
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
86 public BigDecimal getKm() {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
87 return km;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
88 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
89
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
90
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
91 public void setKm(BigDecimal km) {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
92 this.km = km;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
93 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
94
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
95
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
96 @Column(name = "geom")
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
97 @Type(type = "org.hibernatespatial.GeometryUserType")
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
98 public Point getGeom() {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
99 return geom;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
100 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
101
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
102
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
103 public void setGeom(Point geom) {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
104 this.geom = geom;
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
105 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
106
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
107 public static List<Floodmark> getFloodmarks(int riverId) {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
108 Session session = SessionHolder.HOLDER.get();
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
109
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
110 Query query = session.createQuery(
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
111 "from Floodmark where river.id =:river_id");
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
112 query.setParameter("river_id", riverId);
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
113
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
114 return query.list();
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
115 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
116
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
117 public static List<Floodmark> getFloodmarks(int riverId, int year) {
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
118 Session session = SessionHolder.HOLDER.get();
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
119
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
120 Query query = session.createQuery(
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
121 "from Floodmark where river.id =:river_id and year = :year");
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
122 query.setParameter("river_id", riverId);
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
123 query.setParameter("year", year);
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
124
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
125 return query.list();
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
126 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
127 }
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
128 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
559a009b3d72 Add missing classes for Floodmark, WMSFloodmarksArtifact and WMSJettiesArtifact
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
129

http://dive4elements.wald.intevation.org