annotate flys-backend/src/main/java/de/intevation/flys/model/DischargeZone.java @ 2861:b0132e1b9719

Added further shape importers and added the option to reproject shapes during the import process. flys-backend/trunk@4342 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 03 May 2012 14:19:52 +0000
parents 5b54a648f702
children 28526b0b0a90
rev   line source
2825
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.model;
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
2
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
3 import java.io.Serializable;
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
4 import java.math.BigDecimal;
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
5
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
6 import javax.persistence.Entity;
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
7 import javax.persistence.Id;
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
8 import javax.persistence.Table;
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
9 import javax.persistence.GeneratedValue;
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10 import javax.persistence.Column;
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
11 import javax.persistence.SequenceGenerator;
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
12 import javax.persistence.GenerationType;
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13 import javax.persistence.JoinColumn;
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14 import javax.persistence.OneToOne;
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16 import org.apache.log4j.Logger;
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
17
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
18
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
19 @Entity
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
20 @Table(name = "discharge_zone")
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
21 public class DischargeZone
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
22 implements Serializable
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23 {
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
24 private static Logger logger = Logger.getLogger(DischargeZone.class);
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
25
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
26
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
27 private Integer id;
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
28
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
29 private River river;
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
30
2833
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
31 private String gaugeName;
2825
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32
2833
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
33 private BigDecimal value;
2825
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
34
2833
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
35 private String lowerDischarge;
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
36 private String upperDischarge;
2825
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
37
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
38
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
39 public DischargeZone() {
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
40 }
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
41
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
42
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
43 public DischargeZone(
2833
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
44 River river,
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
45 String gaugeName,
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
46 BigDecimal value,
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
47 String lowerDischarge,
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
48 String upperDischarge
2825
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
49 ) {
2833
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
50 this.river = river;
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
51 this.gaugeName = gaugeName;
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
52 this.value = value;
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
53 this.lowerDischarge = lowerDischarge;
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
54 this.upperDischarge = upperDischarge;
2825
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
55 }
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
56
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
57 @Id
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
58 @SequenceGenerator(
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
59 name = "SEQUENCE_DISCHARGE_ZONE_ID_SEQ",
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
60 sequenceName = "DISCHARGE_ZONE_ID_SEQ",
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
61 allocationSize = 1)
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
62 @GeneratedValue(
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
63 strategy = GenerationType.SEQUENCE,
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
64 generator = "SEQUENCE_DISCHARGE_ZONE_ID_SEQ")
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
65 @Column(name = "id")
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
66 public Integer getId() {
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
67 return id;
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
68 }
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
69
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
70 public void setId(Integer id) {
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
71 this.id = id;
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
72 }
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
73
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
74 @OneToOne
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
75 @JoinColumn(name = "river_id" )
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
76 public River getRiver() {
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
77 return river;
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
78 }
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
79
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
80 public void setRiver(River river) {
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
81 this.river = river;
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
82 }
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
83
2833
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
84 @Column(name = "value")
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
85 public BigDecimal getValue() {
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
86 return value;
2825
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
87 }
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
88
2833
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
89 public void setValue(BigDecimal value) {
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
90 this.value = value;
2825
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
91 }
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
92
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
93 @Column(name = "gauge_name")
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
94 public String getGaugeName() {
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
95 return gaugeName;
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
96 }
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
97
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
98 public void setGaugeName(String gaugeName) {
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
99 this.gaugeName = gaugeName;
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
100 }
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
101
2833
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
102 @Column(name = "lower_discharge")
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
103 public String getLowerDischarge() {
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
104 return lowerDischarge;
2825
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
105 }
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
106
2833
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
107 public void setLowerDischarge(String lowerDischarge) {
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
108 this.lowerDischarge = lowerDischarge;
2825
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
109 }
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
110
2833
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
111 @Column(name = "upper_discharge")
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
112 public String getUpperDischarge() {
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
113 return upperDischarge;
2825
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
114 }
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
115
2833
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
116 public void setUpperDischarge(String upperDischarge) {
5b54a648f702 Finished flow velocity data import: finished parsing meta data of model files and repaired broken HQL statements.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2825
diff changeset
117 this.upperDischarge = upperDischarge;
2825
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
118 }
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
119 }
a948366d8ac5 Added new model classes for MINFO specific flow velocity.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
120 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org