Mercurial > dive4elements > river
view flys-backend/src/main/java/de/intevation/flys/model/Range.java @ 202:29a408f80a89
Finished import of WSTs.
flys-backend/trunk@1553 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 23 Mar 2011 16:33:36 +0000 |
parents | 3169b559ca3c |
children | 764835268e2b |
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; import javax.persistence.JoinColumn; import javax.persistence.OneToOne; @Entity @Table(name = "ranges") public class Range implements Serializable { private Integer id; private BigDecimal a; private BigDecimal b; private River river; public Range() { } public Range(BigDecimal a, BigDecimal b, River river) { this.a = a; this.b = b; this.river = river; } @Id @SequenceGenerator( name = "SEQUENCE_RANGES_ID_SEQ", sequenceName = "RANGES_ID_SEQ", allocationSize = 1) @GeneratedValue( strategy = GenerationType.SEQUENCE, generator = "SEQUENCE_RANGES_ID_SEQ") @Column(name = "id") public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } @Column(name = "a") // FIXME: type mapping needed? public BigDecimal getA() { return a; } public void setA(BigDecimal a) { this.a = a; } @Column(name = "b") // FIXME: type mapping needed? public BigDecimal getB() { return b; } public void setB(BigDecimal b) { this.b = b; } @OneToOne @JoinColumn(name = "river_id") public River getRiver() { return river; } public void setRiver(River river) { this.river = river; } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :