comparison 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
comparison
equal deleted inserted replaced
762:23fe9ac1c3b4 763:8076f6a689d0
15 @Entity 15 @Entity
16 @Table(name = "annotations") 16 @Table(name = "annotations")
17 public class Annotation 17 public class Annotation
18 implements Serializable 18 implements Serializable
19 { 19 {
20 private Integer id; 20 private Integer id;
21 private Range range; 21 private Range range;
22 private Attribute attribute; 22 private Attribute attribute;
23 private Position position; 23 private Position position;
24 private Edge edge; 24 private Edge edge;
25 private AnnotationType type;
25 26
26 public Annotation() { 27 public Annotation() {
27 } 28 }
28 29
29 public Annotation(Range range, Attribute attribute, Position position) {
30 this(range, attribute, position, null);
31 }
32
33 public Annotation( 30 public Annotation(
34 Range range, 31 Range range,
35 Attribute attribute, 32 Attribute attribute,
36 Position position, 33 Position position,
37 Edge edge 34 Edge edge,
35 AnnotationType type
38 ) { 36 ) {
39 this.range = range; 37 this.range = range;
40 this.attribute = attribute; 38 this.attribute = attribute;
41 this.position = position; 39 this.position = position;
42 this.edge = edge; 40 this.edge = edge;
41 this.type = type;
43 } 42 }
44 43
45 @Id 44 @Id
46 @SequenceGenerator( 45 @SequenceGenerator(
47 name = "SEQUENCE_ANNOTATIONS_ID_SEQ", 46 name = "SEQUENCE_ANNOTATIONS_ID_SEQ",
96 } 95 }
97 96
98 public void setEdge(Edge edge) { 97 public void setEdge(Edge edge) {
99 this.edge = edge; 98 this.edge = edge;
100 } 99 }
100
101 @OneToOne
102 @JoinColumn(name = "type_id")
103 public AnnotationType getType() {
104 return type;
105 }
106
107 public void setType(AnnotationType type) {
108 this.type = type;
109 }
101 } 110 }
102 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : 111 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org