comparison flys-backend/src/main/java/de/intevation/flys/model/HYKEntry.java @ 1217:d5e39c16fd2a

Schema: Fixed location of 'Peilungsjahre' in HYKs flys-backend/trunk@2343 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sun, 17 Jul 2011 10:24:20 +0000
parents 32ee9babe42c
children 1f21f162bcf3
comparison
equal deleted inserted replaced
1216:f8b5c37f15e4 1217:d5e39c16fd2a
2 2
3 import java.io.Serializable; 3 import java.io.Serializable;
4 4
5 import java.math.BigDecimal; 5 import java.math.BigDecimal;
6 6
7 import java.util.Date;
7 import java.util.List; 8 import java.util.List;
8 9
9 import javax.persistence.Entity; 10 import javax.persistence.Entity;
10 import javax.persistence.Id; 11 import javax.persistence.Id;
11 import javax.persistence.Table; 12 import javax.persistence.Table;
24 implements Serializable 25 implements Serializable
25 { 26 {
26 private Integer id; 27 private Integer id;
27 private HYK hyk; 28 private HYK hyk;
28 private BigDecimal km; 29 private BigDecimal km;
30 private Date measure;
29 31
30 private List<HYKFormation> formations; 32 private List<HYKFormation> formations;
31 33
32 public HYKEntry() { 34 public HYKEntry() {
33 } 35 }
34 36
35 public HYKEntry(HYK hyk, BigDecimal km) { 37 public HYKEntry(HYK hyk, BigDecimal km, Date measure) {
36 this.hyk = hyk; 38 this.hyk = hyk;
37 this.km = km; 39 this.km = km;
40 this.measure = measure;
38 } 41 }
39 42
40 @Id 43 @Id
41 @SequenceGenerator( 44 @SequenceGenerator(
42 name = "SEQUENCE_HYK_ENTRIES_ID_SEQ", 45 name = "SEQUENCE_HYK_ENTRIES_ID_SEQ",
71 74
72 public void setKm(BigDecimal km) { 75 public void setKm(BigDecimal km) {
73 this.km = km; 76 this.km = km;
74 } 77 }
75 78
79 @Column(name = "measure")
80 public Date getMeasure() {
81 return measure;
82 }
83
84 public void setMeasure(Date measure) {
85 this.measure = measure;
86 }
87
76 @OneToMany 88 @OneToMany
77 @OrderBy("formation_num") 89 @OrderBy("formation_num")
78 @JoinColumn(name="hyk_entry_id") 90 @JoinColumn(name="hyk_entry_id")
79 public List<HYKFormation> getFormations() { 91 public List<HYKFormation> getFormations() {
80 return formations; 92 return formations;

http://dive4elements.wald.intevation.org