comparison flys-backend/src/main/java/org/dive4elements/river/model/Annotation.java @ 5828:dfb26b03b179

Moved directories to org.dive4elements.river
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 11:53:11 +0200
parents flys-backend/src/main/java/de/intevation/flys/model/Annotation.java@8076f6a689d0
children 18619c1e7c2a
comparison
equal deleted inserted replaced
5827:e308d4ecd35a 5828:dfb26b03b179
1 package de.intevation.flys.model;
2
3 import java.io.Serializable;
4
5 import javax.persistence.Entity;
6 import javax.persistence.Id;
7 import javax.persistence.Table;
8 import javax.persistence.GeneratedValue;
9 import javax.persistence.Column;
10 import javax.persistence.SequenceGenerator;
11 import javax.persistence.GenerationType;
12 import javax.persistence.OneToOne;
13 import javax.persistence.JoinColumn;
14
15 @Entity
16 @Table(name = "annotations")
17 public class Annotation
18 implements Serializable
19 {
20 private Integer id;
21 private Range range;
22 private Attribute attribute;
23 private Position position;
24 private Edge edge;
25 private AnnotationType type;
26
27 public Annotation() {
28 }
29
30 public Annotation(
31 Range range,
32 Attribute attribute,
33 Position position,
34 Edge edge,
35 AnnotationType type
36 ) {
37 this.range = range;
38 this.attribute = attribute;
39 this.position = position;
40 this.edge = edge;
41 this.type = type;
42 }
43
44 @Id
45 @SequenceGenerator(
46 name = "SEQUENCE_ANNOTATIONS_ID_SEQ",
47 sequenceName = "ANNOTATIONS_ID_SEQ",
48 allocationSize = 1)
49 @GeneratedValue(
50 strategy = GenerationType.SEQUENCE,
51 generator = "SEQUENCE_ANNOTATIONS_ID_SEQ")
52 @Column(name = "id")
53 public Integer getId() {
54 return id;
55 }
56
57 public void setId(Integer id) {
58 this.id = id;
59 }
60
61 @OneToOne
62 @JoinColumn(name = "range_id")
63 public Range getRange() {
64 return range;
65 }
66
67 public void setRange(Range range) {
68 this.range = range;
69 }
70
71 @OneToOne
72 @JoinColumn(name = "attribute_id")
73 public Attribute getAttribute() {
74 return attribute;
75 }
76
77 public void setAttribute(Attribute attribute) {
78 this.attribute = attribute;
79 }
80
81 @OneToOne
82 @JoinColumn(name = "position_id")
83 public Position getPosition() {
84 return position;
85 }
86
87 public void setPosition(Position position) {
88 this.position = position;
89 }
90
91 @OneToOne
92 @JoinColumn(name = "edge_id")
93 public Edge getEdge() {
94 return edge;
95 }
96
97 public void setEdge(Edge edge) {
98 this.edge = edge;
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 }
110 }
111 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org