comparison flys-backend/src/main/java/de/intevation/flys/model/Point3d.java @ 1193:1e3979e07b9e

Added hibernate point3d model flys-backend/trunk@2288 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 06 Jul 2011 10:46:02 +0000
parents
children
comparison
equal deleted inserted replaced
1192:5f8444df19e4 1193:1e3979e07b9e
1 package de.intevation.flys.model;
2
3 import java.io.Serializable;
4
5 import java.math.BigDecimal;
6
7 import javax.persistence.Entity;
8 import javax.persistence.Id;
9 import javax.persistence.Table;
10 import javax.persistence.GeneratedValue;
11 import javax.persistence.Column;
12 import javax.persistence.SequenceGenerator;
13 import javax.persistence.GenerationType;
14
15 @Entity
16 @Table(name = "points3d")
17 public class Point3d
18 implements Serializable
19 {
20 private Integer id;
21 private BigDecimal x;
22 private BigDecimal y;
23 private BigDecimal z;
24
25 public Point3d() {
26 }
27
28 public Point3d(BigDecimal x, BigDecimal y, BigDecimal z) {
29 this.x = x;
30 this.y = y;
31 this.z = z;
32 }
33
34 @Id
35 @SequenceGenerator(
36 name = "SEQUENCE_POINTS3D_ID_SEQ",
37 sequenceName = "POINTS3D_ID_SEQ",
38 allocationSize = 1)
39 @GeneratedValue(
40 strategy = GenerationType.SEQUENCE,
41 generator = "SEQUENCE_POINTS3D_ID_SEQ")
42 @Column(name = "id")
43 public Integer getId() {
44 return id;
45 }
46
47 public void setId(Integer id) {
48 this.id = id;
49 }
50
51 @Column(name = "x")
52 public BigDecimal getX() {
53 return x;
54 }
55
56 public void setX(BigDecimal x) {
57 this.x = x;
58 }
59
60 @Column(name = "y")
61 public BigDecimal getY() {
62 return y;
63 }
64
65 public void setY(BigDecimal y) {
66 this.y = y;
67 }
68
69 @Column(name = "z")
70 public BigDecimal getZ() {
71 return z;
72 }
73
74 public void setZ(BigDecimal z) {
75 this.z = z;
76 }
77 }
78 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org