Mercurial > dive4elements > river
annotate flys-backend/src/main/java/de/intevation/flys/model/SQRelation.java @ 3326:ff70ff6c0629
Improved the import process to read MINFO specific 'Messstellen'.
flys-backend/trunk@4644 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 12 Jun 2012 13:45:19 +0000 |
parents | a2a33eff93aa |
children | cc8fc6b29649 |
rev | line source |
---|---|
3321
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.model; |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
2 |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
3 import java.io.Serializable; |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
4 |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
5 import java.util.List; |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
6 |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
7 import javax.persistence.Entity; |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
8 import javax.persistence.Id; |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
9 import javax.persistence.Table; |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
10 import javax.persistence.GeneratedValue; |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
11 import javax.persistence.Column; |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
12 import javax.persistence.SequenceGenerator; |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
13 import javax.persistence.OneToMany; |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
14 import javax.persistence.JoinColumn; |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
15 import javax.persistence.GenerationType; |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
16 |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
17 |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
18 @Entity |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
19 @Table(name = "sq_relation") |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
20 public class SQRelation implements Serializable { |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
21 |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
22 private Integer id; |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
23 |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
24 private TimeInterval timeInterval; |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
25 |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
26 private String description; |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
27 |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
28 private List<SQRelationValue> values; |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
29 |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
30 |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
31 @Id |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
32 @SequenceGenerator( |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
33 name = "SEQUENCE_SQ_ID_SEQ", |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
34 sequenceName = "SQ_RELATION_ID_SEQ", |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
35 allocationSize = 1) |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
36 @GeneratedValue( |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
37 strategy = GenerationType.SEQUENCE, |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
38 generator = "SEQUENCE_SQ_ID_SEQ") |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
39 @Column(name = "id") |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
40 public Integer getId() { |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
41 return id; |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
42 } |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
43 |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
44 public void setId(Integer id) { |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
45 this.id = id; |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
46 } |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
47 |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
48 |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
49 @Column(name = "description") |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
50 public String getDescription() { |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
51 return description; |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
52 } |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
53 |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
54 public void setDescription(String description) { |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
55 this.description = description; |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
56 } |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
57 |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
58 |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
59 @Column(name = "time_interval") |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
60 public TimeInterval getTimeInterval() { |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
61 return timeInterval; |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
62 } |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
63 |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
64 public void setTimeInterval(TimeInterval timeInterval) { |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
65 this.timeInterval = timeInterval; |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
66 } |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
67 |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
68 |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
69 @OneToMany |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
70 @JoinColumn(name = "sq_relation_id") |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
71 public List<SQRelationValue> getValues() { |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
72 return values; |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
73 } |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
74 |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
75 public void setValues(List<SQRelationValue> values) { |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
76 this.values = values; |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
77 } |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
78 } |
a2a33eff93aa
Improved minfo db schema and added model classes for s/q relation.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff
changeset
|
79 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |