Mercurial > dive4elements > river
view 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 |
line wrap: on
line source
package de.intevation.flys.model; import java.io.Serializable; import java.math.BigDecimal; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.GeneratedValue; import javax.persistence.Column; import javax.persistence.SequenceGenerator; import javax.persistence.GenerationType; @Entity @Table(name = "points3d") public class Point3d implements Serializable { private Integer id; private BigDecimal x; private BigDecimal y; private BigDecimal z; public Point3d() { } public Point3d(BigDecimal x, BigDecimal y, BigDecimal z) { this.x = x; this.y = y; this.z = z; } @Id @SequenceGenerator( name = "SEQUENCE_POINTS3D_ID_SEQ", sequenceName = "POINTS3D_ID_SEQ", allocationSize = 1) @GeneratedValue( strategy = GenerationType.SEQUENCE, generator = "SEQUENCE_POINTS3D_ID_SEQ") @Column(name = "id") public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } @Column(name = "x") public BigDecimal getX() { return x; } public void setX(BigDecimal x) { this.x = x; } @Column(name = "y") public BigDecimal getY() { return y; } public void setY(BigDecimal y) { this.y = y; } @Column(name = "z") public BigDecimal getZ() { return z; } public void setZ(BigDecimal z) { this.z = z; } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :