comparison flys-backend/src/main/java/de/intevation/flys/model/CrossSectionTrack.java @ 1230:e2deda3b77a7

Introduced support for FLYS spatial data. flys-backend/trunk@2507 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 18 Aug 2011 15:03:20 +0000
parents
children 47ce1fab8464
comparison
equal deleted inserted replaced
1229:8b12b338a3f6 1230:e2deda3b77a7
1 package de.intevation.flys.model;
2
3 import java.io.Serializable;
4 import java.math.BigDecimal;
5
6 import javax.persistence.Column;
7 import javax.persistence.Entity;
8 import javax.persistence.Id;
9 import javax.persistence.JoinColumn;
10 import javax.persistence.OneToOne;
11 import javax.persistence.Table;
12
13 import org.hibernate.annotations.Type;
14
15 import com.vividsolutions.jts.geom.LineString;
16
17
18 @Entity
19 @Table(name = "cross_section_tracks")
20 public class CrossSectionTrack
21 implements Serializable
22 {
23 private Integer id;
24 private River river;
25 private LineString geom;
26 private BigDecimal km;
27 private BigDecimal z;
28
29 public CrossSectionTrack() {
30 }
31
32
33 @Id
34 @Column(name = "id")
35 public Integer getId() {
36 return id;
37 }
38
39
40 public void setId(Integer id) {
41 this.id = id;
42 }
43
44
45 @OneToOne
46 @JoinColumn(name = "river_id")
47 public River getRiver() {
48 return river;
49 }
50
51
52 public void setRiver(River river) {
53 this.river = river;
54 }
55
56
57 @Column(name = "geom")
58 @Type(type = "org.hibernatespatial.GeometryUserType")
59 public LineString getGeom() {
60 return geom;
61 }
62
63
64 public void setGeom(LineString geom) {
65 this.geom = geom;
66 }
67
68
69 @Column(name = "km")
70 public BigDecimal getKm() {
71 return km;
72 }
73
74
75 public void setKm(BigDecimal km) {
76 this.km = km;
77 }
78
79
80 @Column(name = "z")
81 public BigDecimal getZ() {
82 return z;
83 }
84
85
86 public void setZ(BigDecimal z) {
87 this.z = z;
88 }
89 }
90 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org