comparison flys-backend/src/main/java/de/intevation/flys/model/Line.java @ 3807:d73c43798a99 pre2.6-2011-11-04

merged flys-backend/pre2.6-2011-11-04
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:14:51 +0200
parents e2deda3b77a7
children 60532f75396b
comparison
equal deleted inserted replaced
3806:881fcd01e056 3807:d73c43798a99
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 = "lines")
20 public class Line
21 implements Serializable
22 {
23 private Integer id;
24 private Integer kind;
25 private River river;
26 private LineString geom;
27 private BigDecimal z;
28
29 public Line() {
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 = "kind")
58 public Integer getKind() {
59 return kind;
60 }
61
62
63 public void setKind(Integer kind) {
64 this.kind = kind;
65 }
66
67
68 @Column(name = "geom")
69 @Type(type = "org.hibernatespatial.GeometryUserType")
70 public LineString getGeom() {
71 return geom;
72 }
73
74
75 public void setGeom(LineString geom) {
76 this.geom = geom;
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