Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/model/CrossSection.java @ 1210:31d8638760b1
New. The hibernate models
for the HYK structures.
flys-backend/trunk@2336 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 15 Jul 2011 11:12:14 +0000 |
parents | 22858e7cca79 |
children | 8be27b950dbe |
comparison
equal
deleted
inserted
replaced
1209:c12b5fbd33e8 | 1210:31d8638760b1 |
---|---|
11 import javax.persistence.Column; | 11 import javax.persistence.Column; |
12 import javax.persistence.SequenceGenerator; | 12 import javax.persistence.SequenceGenerator; |
13 import javax.persistence.GenerationType; | 13 import javax.persistence.GenerationType; |
14 import javax.persistence.OneToOne; | 14 import javax.persistence.OneToOne; |
15 import javax.persistence.OneToMany; | 15 import javax.persistence.OneToMany; |
16 import javax.persistence.OrderBy; | |
16 import javax.persistence.JoinColumn; | 17 import javax.persistence.JoinColumn; |
17 | 18 |
18 @Entity | 19 @Entity |
19 @Table(name = "cross_sections") | 20 @Table(name = "cross_sections") |
20 public class CrossSection | 21 public class CrossSection |
84 public void setDescription(String description) { | 85 public void setDescription(String description) { |
85 this.description = description; | 86 this.description = description; |
86 } | 87 } |
87 | 88 |
88 @OneToMany | 89 @OneToMany |
90 @OrderBy("km") | |
89 @JoinColumn(name="cross_section_id") | 91 @JoinColumn(name="cross_section_id") |
90 public List<CrossSectionLine> getLines() { | 92 public List<CrossSectionLine> getLines() { |
91 return lines; | 93 return lines; |
92 } | 94 } |
93 | 95 |