Mercurial > dive4elements > river
annotate flys-backend/src/main/java/de/intevation/flys/model/HYKFormation.java @ 1213:cc88db4a5b34
Added method
walkTree() to traverse a directory tree. To be reused in HYK parser.
flys-backend/trunk@2339 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 15 Jul 2011 15:36:59 +0000 |
parents | 31d8638760b1 |
children | 32ee9babe42c |
rev | line source |
---|---|
1210
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.flys.model; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
2 |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
3 import java.io.Serializable; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
4 |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
5 import java.util.List; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
6 |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
7 import java.math.BigDecimal; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
8 |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
9 import javax.persistence.Entity; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
10 import javax.persistence.Id; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
11 import javax.persistence.Table; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
12 import javax.persistence.GeneratedValue; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
13 import javax.persistence.Column; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
14 import javax.persistence.SequenceGenerator; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
15 import javax.persistence.GenerationType; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
16 import javax.persistence.OneToOne; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
17 import javax.persistence.OneToMany; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
18 import javax.persistence.OrderBy; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
19 import javax.persistence.JoinColumn; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
20 |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
21 @Entity |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
22 @Table(name = "hyk_formations") |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
23 public class HYKFormation |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
24 implements Serializable |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
25 { |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
26 private Integer id; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
27 private Integer formationNum; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
28 private HYKEntry entry; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
29 private BigDecimal top; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
30 private BigDecimal bottom; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
31 |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
32 private List<HYKFlowZone> zones; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
33 |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
34 public HYKFormation() { |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
35 } |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
36 |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
37 public HYKFormation( |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
38 Integer formationNum, |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
39 HYKEntry entry, |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
40 BigDecimal top, |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
41 BigDecimal bottom |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
42 ) { |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
43 this.formationNum = formationNum; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
44 this.entry = entry; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
45 this.top = top; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
46 this.bottom = bottom; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
47 } |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
48 |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
49 @Id |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
50 @SequenceGenerator( |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
51 name = "SEQUENCE_HYK_FORMATIONS_ID_SEQ", |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
52 sequenceName = "HYK_FORMATIONS_ID_SEQ", |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
53 allocationSize = 1) |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
54 @GeneratedValue( |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
55 strategy = GenerationType.SEQUENCE, |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
56 generator = "SEQUENCE_HYK_FORMATIONS_ID_SEQ") |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
57 @Column(name = "id") |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
58 public Integer getId() { |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
59 return id; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
60 } |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
61 |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
62 public void setId(Integer id) { |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
63 this.id = id; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
64 } |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
65 |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
66 @Column(name = "formation_num") |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
67 public Integer getFormationNum() { |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
68 return formationNum; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
69 } |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
70 |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
71 public void setFormationNum(Integer formationNum) { |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
72 this.formationNum = formationNum; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
73 } |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
74 |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
75 @OneToOne |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
76 @JoinColumn(name = "hyk_entry_id") |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
77 public HYKEntry getEntry() { |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
78 return entry; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
79 } |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
80 |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
81 public void setEntry(HYKEntry entry) { |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
82 this.entry = entry; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
83 } |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
84 |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
85 @Column(name = "top") |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
86 public BigDecimal getTop() { |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
87 return top; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
88 } |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
89 |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
90 public void setTop(BigDecimal top) { |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
91 this.top = top; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
92 } |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
93 |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
94 @Column(name = "bottom") |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
95 public BigDecimal getBottom() { |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
96 return bottom; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
97 } |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
98 |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
99 public void setBottom(BigDecimal bottom) { |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
100 this.bottom = bottom; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
101 } |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
102 |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
103 @OneToMany |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
104 @OrderBy("a") |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
105 @JoinColumn(name="formation_id") |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
106 public List<HYKFlowZone> getZones() { |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
107 return zones; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
108 } |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
109 |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
110 public void setZones(List<HYKFlowZone> zones) { |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
111 this.zones = zones; |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
112 } |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
113 } |
31d8638760b1
New. The hibernate models
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff
changeset
|
114 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |