diff flys-backend/src/main/java/de/intevation/flys/model/HydrBoundaryPoly.java @ 5379:61bf64b102bc mapgenfix

Merge with default branch
author Christian Lins <christian.lins@intevation.de>
date Fri, 22 Mar 2013 11:25:54 +0100
parents a2600507761e
children 87dab419b924
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/model/HydrBoundaryPoly.java	Wed Mar 06 14:14:15 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/model/HydrBoundaryPoly.java	Fri Mar 22 11:25:54 2013 +0100
@@ -5,10 +5,13 @@
 
 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;
@@ -28,12 +31,22 @@
     private String     name;
     private River      river;
     private Geometry   geom;
+    private SectieKind sectie;
+    private SobekKind  sobek;
+    private BoundaryKind kind;
 
     public HydrBoundaryPoly() {
     }
 
 
     @Id
+    @SequenceGenerator(
+        name           = "SEQUENCE_HYDR_BOUNDARIES_POLY_ID_SEQ",
+        sequenceName   = "HYDR_BOUNDARIES_POLY_ID_SEQ",
+        allocationSize = 1)
+    @GeneratedValue(
+        strategy  = GenerationType.SEQUENCE,
+        generator = "SEQUENCE_HYDR_BOUNDARIES_POLY_ID_SEQ")
     @Column(name = "id")
     public Integer getId() {
         return id;
@@ -90,5 +103,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 :

http://dive4elements.wald.intevation.org