Mercurial > dive4elements > river
diff flys-backend/src/main/java/de/intevation/flys/model/HydrBoundary.java @ 5379:61bf64b102bc mapgenfix
Merge with default branch
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Fri, 22 Mar 2013 11:25:54 +0100 (2013-03-22) |
parents | 8aac391871f9 |
children | 87dab419b924 |
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/model/HydrBoundary.java Wed Mar 06 14:14:15 2013 +0100 +++ b/flys-backend/src/main/java/de/intevation/flys/model/HydrBoundary.java Fri Mar 22 11:25:54 2013 +0100 @@ -5,16 +5,19 @@ import javax.persistence.Column; import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.OneToOne; import javax.persistence.Table; +import javax.persistence.SequenceGenerator; import org.hibernate.Session; import org.hibernate.Query; import org.hibernate.annotations.Type; -import com.vividsolutions.jts.geom.LineString; +import com.vividsolutions.jts.geom.MultiLineString; import de.intevation.flys.backend.SessionHolder; @@ -25,15 +28,25 @@ implements Serializable { private Integer id; + private SectieKind sectie; + private SobekKind sobek; private String name; private River river; - private LineString geom; + private MultiLineString geom; + private BoundaryKind kind; public HydrBoundary() { } @Id + @SequenceGenerator( + name = "SEQUENCE_HYDR_BOUNDARIES_ID_SEQ", + sequenceName = "HYDR_BOUNDARIES_ID_SEQ", + allocationSize = 1) + @GeneratedValue( + strategy = GenerationType.SEQUENCE, + generator = "SEQUENCE_HYDR_BOUNDARIES_ID_SEQ") @Column(name = "id") public Integer getId() { return id; @@ -44,7 +57,6 @@ this.id = id; } - @OneToOne @JoinColumn(name = "river_id") public River getRiver() { @@ -70,12 +82,12 @@ @Column(name = "geom") @Type(type = "org.hibernatespatial.GeometryUserType") - public LineString getGeom() { + public MultiLineString getGeom() { return geom; } - public void setGeom(LineString geom) { + public void setGeom(MultiLineString geom) { this.geom = geom; } @@ -90,5 +102,71 @@ return query.list(); } + + /** + * Get sectie. + * + * @return sectie as SectieKind. + */ + @OneToOne + @JoinColumn(name = "sectie") + public SectieKind getSectie() + { + return sectie; + } + + /** + * Set sectie. + * + * @param sectie the value to set. + */ + public void setSectie(SectieKind sectie) + { + this.sectie = sectie; + } + + /** + * Get sobek. + * + * @return sobek as SobekKind. + */ + @OneToOne + @JoinColumn(name = "sobek") + public SobekKind getSobek() + { + return sobek; + } + + /** + * Set sobek. + * + * @param sobek the value to set. + */ + public void setSobek(SobekKind sobek) + { + this.sobek = sobek; + } + + /** + * Get kind. + * + * @return kind as BoundaryKind. + */ + @OneToOne + @JoinColumn(name = "kind") + public BoundaryKind getKind() + { + return kind; + } + + /** + * Set kind. + * + * @param kind the value to set. + */ + public void setKind(BoundaryKind kind) + { + this.kind = kind; + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :