diff flys-backend/src/main/java/de/intevation/flys/model/Annotation.java @ 763:8076f6a689d0

First part of flys/issue18 flys-backend/trunk@2124 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 15 Jun 2011 09:22:00 +0000
parents bf16268629d9
children
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/model/Annotation.java	Tue Jun 14 17:30:09 2011 +0000
+++ b/flys-backend/src/main/java/de/intevation/flys/model/Annotation.java	Wed Jun 15 09:22:00 2011 +0000
@@ -17,29 +17,28 @@
 public class Annotation
 implements   Serializable
 {
-    private Integer    id;
-    private Range      range;
-    private Attribute  attribute;
-    private Position   position;
-    private Edge       edge;
+    private Integer        id;
+    private Range          range;
+    private Attribute      attribute;
+    private Position       position;
+    private Edge           edge;
+    private AnnotationType type;
 
     public Annotation() {
     }
 
-    public Annotation(Range range, Attribute attribute, Position position) {
-        this(range, attribute, position, null);
-    }
-
     public Annotation(
-        Range     range,
-        Attribute attribute,
-        Position  position,
-        Edge      edge
+        Range          range,
+        Attribute      attribute,
+        Position       position,
+        Edge           edge,
+        AnnotationType type
     ) {
         this.range     = range;
         this.attribute = attribute;
         this.position  = position;
         this.edge      = edge;
+        this.type      = type;
     }
 
     @Id
@@ -98,5 +97,15 @@
     public void setEdge(Edge edge) {
         this.edge = edge;
     }
+
+    @OneToOne
+    @JoinColumn(name = "type_id")
+    public AnnotationType getType() {
+        return type;
+    }
+
+    public void setType(AnnotationType type) {
+        this.type = type;
+    }
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org