Mercurial > dive4elements > river
comparison backend/src/main/java/org/dive4elements/river/seddb/model/Mpeilung.java @ 5873:1e68eca26b8a
river backend: Moved SedDB hibernate model to org/dive4elements/river/seddb.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Mon, 29 Apr 2013 11:33:01 +0200 |
parents | backend/src/main/java/de/intevation/seddb/model/Mpeilung.java@4dd33b86dc61 |
children | 7ba4815a52a4 |
comparison
equal
deleted
inserted
replaced
5872:bc4e1bf26227 | 5873:1e68eca26b8a |
---|---|
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde | |
2 * Software engineering by Intevation GmbH | |
3 * | |
4 * This file is Free Software under the GNU AGPL (>=v3) | |
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the | |
6 * documentation coming with Dive4Elements River for details. | |
7 */ | |
8 | |
9 package org.dive4elements.seddb.model; | |
10 // Generated 14.06.2012 11:30:57 by Hibernate Tools 3.4.0.CR1 | |
11 | |
12 | |
13 import java.math.BigDecimal; | |
14 import java.util.Date; | |
15 import java.util.HashSet; | |
16 import java.util.Set; | |
17 import javax.persistence.Column; | |
18 import javax.persistence.Entity; | |
19 import javax.persistence.FetchType; | |
20 import javax.persistence.Id; | |
21 import javax.persistence.JoinColumn; | |
22 import javax.persistence.ManyToOne; | |
23 import javax.persistence.OneToMany; | |
24 import javax.persistence.Table; | |
25 import javax.persistence.Temporal; | |
26 import javax.persistence.TemporalType; | |
27 | |
28 /** | |
29 * Mpeilung generated by hbm2java | |
30 */ | |
31 @Entity | |
32 @Table(name="MPEILUNG" | |
33 ,schema="SEDDB" | |
34 ) | |
35 public class Mpeilung implements java.io.Serializable { | |
36 | |
37 | |
38 private long mpeilungid; | |
39 private Station station; | |
40 private Date datum; | |
41 private BigDecimal km; | |
42 private String bemerkung; | |
43 private Date lastupdated; | |
44 private Long oldapeilid; | |
45 private Set<Mpeilpunkt> mpeilpunkts = new HashSet<Mpeilpunkt>(0); | |
46 | |
47 public Mpeilung() { | |
48 } | |
49 | |
50 public Mpeilung(long mpeilungid, Station station, Date datum, BigDecimal km, Date lastupdated) { | |
51 this.mpeilungid = mpeilungid; | |
52 this.station = station; | |
53 this.datum = datum; | |
54 this.km = km; | |
55 this.lastupdated = lastupdated; | |
56 } | |
57 public Mpeilung(long mpeilungid, Station station, Date datum, BigDecimal km, String bemerkung, Date lastupdated, Long oldapeilid, Set<Mpeilpunkt> mpeilpunkts) { | |
58 this.mpeilungid = mpeilungid; | |
59 this.station = station; | |
60 this.datum = datum; | |
61 this.km = km; | |
62 this.bemerkung = bemerkung; | |
63 this.lastupdated = lastupdated; | |
64 this.oldapeilid = oldapeilid; | |
65 this.mpeilpunkts = mpeilpunkts; | |
66 } | |
67 | |
68 @Id | |
69 | |
70 | |
71 @Column(name="MPEILUNGID", unique=true, nullable=false, precision=11, scale=0) | |
72 public long getMpeilungid() { | |
73 return this.mpeilungid; | |
74 } | |
75 | |
76 public void setMpeilungid(long mpeilungid) { | |
77 this.mpeilungid = mpeilungid; | |
78 } | |
79 | |
80 @ManyToOne(fetch=FetchType.LAZY) | |
81 @JoinColumn(name="STATIONID", nullable=false) | |
82 public Station getStation() { | |
83 return this.station; | |
84 } | |
85 | |
86 public void setStation(Station station) { | |
87 this.station = station; | |
88 } | |
89 | |
90 @Temporal(TemporalType.DATE) | |
91 @Column(name="DATUM", nullable=false, length=7) | |
92 public Date getDatum() { | |
93 return this.datum; | |
94 } | |
95 | |
96 public void setDatum(Date datum) { | |
97 this.datum = datum; | |
98 } | |
99 | |
100 | |
101 @Column(name="KM", nullable=false, precision=8, scale=3) | |
102 public BigDecimal getKm() { | |
103 return this.km; | |
104 } | |
105 | |
106 public void setKm(BigDecimal km) { | |
107 this.km = km; | |
108 } | |
109 | |
110 | |
111 @Column(name="BEMERKUNG", length=240) | |
112 public String getBemerkung() { | |
113 return this.bemerkung; | |
114 } | |
115 | |
116 public void setBemerkung(String bemerkung) { | |
117 this.bemerkung = bemerkung; | |
118 } | |
119 | |
120 @Temporal(TemporalType.DATE) | |
121 @Column(name="LASTUPDATED", nullable=false, length=7) | |
122 public Date getLastupdated() { | |
123 return this.lastupdated; | |
124 } | |
125 | |
126 public void setLastupdated(Date lastupdated) { | |
127 this.lastupdated = lastupdated; | |
128 } | |
129 | |
130 | |
131 @Column(name="OLDAPEILID", precision=11, scale=0) | |
132 public Long getOldapeilid() { | |
133 return this.oldapeilid; | |
134 } | |
135 | |
136 public void setOldapeilid(Long oldapeilid) { | |
137 this.oldapeilid = oldapeilid; | |
138 } | |
139 | |
140 @OneToMany(fetch=FetchType.LAZY, mappedBy="mpeilung") | |
141 public Set<Mpeilpunkt> getMpeilpunkts() { | |
142 return this.mpeilpunkts; | |
143 } | |
144 | |
145 public void setMpeilpunkts(Set<Mpeilpunkt> mpeilpunkts) { | |
146 this.mpeilpunkts = mpeilpunkts; | |
147 } | |
148 } |