comparison flys-backend/src/main/java/de/intevation/flys/model/Building.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 2246348ff90e
comparison
equal deleted inserted replaced
3806:881fcd01e056 3807:d73c43798a99
1 package de.intevation.flys.model;
2
3 import java.io.Serializable;
4
5 import javax.persistence.Column;
6 import javax.persistence.Entity;
7 import javax.persistence.Id;
8 import javax.persistence.JoinColumn;
9 import javax.persistence.OneToOne;
10 import javax.persistence.Table;
11
12 import org.hibernate.annotations.Type;
13
14 import com.vividsolutions.jts.geom.LineString;
15
16
17 @Entity
18 @Table(name = "buildings")
19 public class Building
20 implements Serializable
21 {
22 private Integer id;
23 private River river;
24 private String name;
25 private LineString geom;
26
27 public Building() {
28 }
29
30
31 @Id
32 @Column(name = "id")
33 public Integer getId() {
34 return id;
35 }
36
37
38 public void setId(Integer id) {
39 this.id = id;
40 }
41
42
43 @OneToOne
44 @JoinColumn(name = "river_id")
45 public River getRiver() {
46 return river;
47 }
48
49
50 public void setRiver(River river) {
51 this.river = river;
52 }
53
54
55 @Column(name = "name")
56 public String getName() {
57 return name;
58 }
59
60
61 public void setName(String name) {
62 this.name = name;
63 }
64
65
66 @Column(name = "geom")
67 @Type(type = "org.hibernatespatial.GeometryUserType")
68 public LineString getGeom() {
69 return geom;
70 }
71
72
73 public void setGeom(LineString geom) {
74 this.geom = geom;
75 }
76 }
77 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org