comparison src/main/java/de/intevation/lada/model/stammdaten/Verwaltungseinheit.java @ 1195:768a4c957a18

Added ort factory to generate and find attributes, updated model.
author Raimund Renkert <raimund.renkert@intevation.de>
date Tue, 29 Nov 2016 15:59:38 +0100
parents 186d602e031a
children 563c7d18c45f
comparison
equal deleted inserted replaced
1194:289edf060550 1195:768a4c957a18
3 import java.io.Serializable; 3 import java.io.Serializable;
4 4
5 import javax.persistence.Column; 5 import javax.persistence.Column;
6 import javax.persistence.Entity; 6 import javax.persistence.Entity;
7 import javax.persistence.Id; 7 import javax.persistence.Id;
8
9 import org.hibernate.annotations.Type;
10
11 import com.fasterxml.jackson.annotation.JsonIgnore;
12 import com.vividsolutions.jts.geom.Point;
8 13
9 14
10 /** 15 /**
11 * The persistent class for the verwaltungseinheit database table. 16 * The persistent class for the verwaltungseinheit database table.
12 * 17 *
21 private String bezeichnung; 26 private String bezeichnung;
22 27
23 private String bundesland; 28 private String bundesland;
24 29
25 @Column(name="is_bundesland") 30 @Column(name="is_bundesland")
26 private String isBundesland; 31 private Boolean isBundesland;
27 32
28 @Column(name="is_gemeinde") 33 @Column(name="is_gemeinde")
29 private String isGemeinde; 34 private Boolean isGemeinde;
30 35
31 @Column(name="is_landkreis") 36 @Column(name="is_landkreis")
32 private String isLandkreis; 37 private Boolean isLandkreis;
33 38
34 @Column(name="is_regbezirk") 39 @Column(name="is_regbezirk")
35 private String isRegbezirk; 40 private Boolean isRegbezirk;
36
37 @Column(name="kda_id")
38 private Integer kdaId;
39
40 @Column(name="koord_x_extern")
41 private String koordXExtern;
42
43 @Column(name="koord_y_extern")
44 private String koordYExtern;
45 41
46 private String kreis; 42 private String kreis;
47
48 private Double latitude;
49
50 private Double longitude;
51 43
52 private String nuts; 44 private String nuts;
53 45
54 private String plz; 46 private String plz;
55 47
56 private String regbezirk; 48 private String regbezirk;
49
50 @Column(columnDefinition="geometry(Point, 4326)")
51 @Type(type = "org.hibernate.spatial.GeometryType")
52 private Point mittelpunkt;
57 53
58 public Verwaltungseinheit() { 54 public Verwaltungseinheit() {
59 } 55 }
60 56
61 public String getId() { 57 public String getId() {
80 76
81 public void setBundesland(String bundesland) { 77 public void setBundesland(String bundesland) {
82 this.bundesland = bundesland; 78 this.bundesland = bundesland;
83 } 79 }
84 80
85 public String getIsBundesland() { 81 public Boolean getIsBundesland() {
86 return this.isBundesland; 82 return this.isBundesland;
87 } 83 }
88 84
89 public void setIsBundesland(String isBundesland) { 85 public void setIsBundesland(Boolean isBundesland) {
90 this.isBundesland = isBundesland; 86 this.isBundesland = isBundesland;
91 } 87 }
92 88
93 public String getIsGemeinde() { 89 public Boolean getIsGemeinde() {
94 return this.isGemeinde; 90 return this.isGemeinde;
95 } 91 }
96 92
97 public void setIsGemeinde(String isGemeinde) { 93 public void setIsGemeinde(Boolean isGemeinde) {
98 this.isGemeinde = isGemeinde; 94 this.isGemeinde = isGemeinde;
99 } 95 }
100 96
101 public String getIsLandkreis() { 97 public Boolean getIsLandkreis() {
102 return this.isLandkreis; 98 return this.isLandkreis;
103 } 99 }
104 100
105 public void setIsLandkreis(String isLandkreis) { 101 public void setIsLandkreis(Boolean isLandkreis) {
106 this.isLandkreis = isLandkreis; 102 this.isLandkreis = isLandkreis;
107 } 103 }
108 104
109 public String getIsRegbezirk() { 105 public Boolean getIsRegbezirk() {
110 return this.isRegbezirk; 106 return this.isRegbezirk;
111 } 107 }
112 108
113 public void setIsRegbezirk(String isRegbezirk) { 109 public void setIsRegbezirk(Boolean isRegbezirk) {
114 this.isRegbezirk = isRegbezirk; 110 this.isRegbezirk = isRegbezirk;
115 }
116
117 public Integer getKdaId() {
118 return this.kdaId;
119 }
120
121 public void setKdaId(Integer kdaId) {
122 this.kdaId = kdaId;
123 }
124
125 public String getKoordXExtern() {
126 return this.koordXExtern;
127 }
128
129 public void setKoordXExtern(String koordXExtern) {
130 this.koordXExtern = koordXExtern;
131 }
132
133 public String getKoordYExtern() {
134 return this.koordYExtern;
135 }
136
137 public void setKoordYExtern(String koordYExtern) {
138 this.koordYExtern = koordYExtern;
139 } 111 }
140 112
141 public String getKreis() { 113 public String getKreis() {
142 return this.kreis; 114 return this.kreis;
143 } 115 }
145 public void setKreis(String kreis) { 117 public void setKreis(String kreis) {
146 this.kreis = kreis; 118 this.kreis = kreis;
147 } 119 }
148 120
149 public Double getLatitude() { 121 public Double getLatitude() {
150 return this.latitude; 122 return this.mittelpunkt.getY();
151 }
152
153 public void setLatitude(Double latitude) {
154 this.latitude = latitude;
155 } 123 }
156 124
157 public Double getLongitude() { 125 public Double getLongitude() {
158 return this.longitude; 126 return this.mittelpunkt.getX();
159 }
160
161 public void setLongitude(Double longitude) {
162 this.longitude = longitude;
163 } 127 }
164 128
165 public String getNuts() { 129 public String getNuts() {
166 return this.nuts; 130 return this.nuts;
167 } 131 }
184 148
185 public void setRegbezirk(String regbezirk) { 149 public void setRegbezirk(String regbezirk) {
186 this.regbezirk = regbezirk; 150 this.regbezirk = regbezirk;
187 } 151 }
188 152
153 @JsonIgnore
154 public Point getMittelpunkt() {
155 return mittelpunkt;
156 }
157
158 @JsonIgnore
159 public void setMittelpunkt(Point mittelpunkt) {
160 this.mittelpunkt = mittelpunkt;
161 }
162
189 } 163 }
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)