Mercurial > dive4elements > river
comparison backend/src/main/java/org/dive4elements/river/seddb/model/Gewaesser.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/Gewaesser.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.HashSet; | |
15 import java.util.Set; | |
16 import javax.persistence.Column; | |
17 import javax.persistence.Entity; | |
18 import javax.persistence.FetchType; | |
19 import javax.persistence.Id; | |
20 import javax.persistence.OneToMany; | |
21 import javax.persistence.Table; | |
22 import javax.persistence.UniqueConstraint; | |
23 | |
24 /** | |
25 * Gewaesser generated by hbm2java | |
26 */ | |
27 @Entity | |
28 @Table(name="GEWAESSER" | |
29 ,schema="SEDDB" | |
30 , uniqueConstraints = @UniqueConstraint(columnNames="NAME") | |
31 ) | |
32 public class Gewaesser implements java.io.Serializable { | |
33 | |
34 | |
35 private long gewaesserid; | |
36 private String name; | |
37 private String kennung; | |
38 private BigDecimal laenge; | |
39 private BigDecimal einzugsgebiet; | |
40 private String bemerkung; | |
41 private Set<Bezugspegel> bezugspegels = new HashSet<Bezugspegel>(0); | |
42 private Set<Station> stations = new HashSet<Station>(0); | |
43 | |
44 public Gewaesser() { | |
45 } | |
46 | |
47 public Gewaesser(long gewaesserid, String name) { | |
48 this.gewaesserid = gewaesserid; | |
49 this.name = name; | |
50 } | |
51 public Gewaesser(long gewaesserid, String name, String kennung, BigDecimal laenge, BigDecimal einzugsgebiet, String bemerkung, Set<Bezugspegel> bezugspegels, Set<Station> stations) { | |
52 this.gewaesserid = gewaesserid; | |
53 this.name = name; | |
54 this.kennung = kennung; | |
55 this.laenge = laenge; | |
56 this.einzugsgebiet = einzugsgebiet; | |
57 this.bemerkung = bemerkung; | |
58 this.bezugspegels = bezugspegels; | |
59 this.stations = stations; | |
60 } | |
61 | |
62 @Id | |
63 | |
64 | |
65 @Column(name="GEWAESSERID", unique=true, nullable=false, precision=11, scale=0) | |
66 public long getGewaesserid() { | |
67 return this.gewaesserid; | |
68 } | |
69 | |
70 public void setGewaesserid(long gewaesserid) { | |
71 this.gewaesserid = gewaesserid; | |
72 } | |
73 | |
74 | |
75 @Column(name="NAME", unique=true, nullable=false, length=20) | |
76 public String getName() { | |
77 return this.name; | |
78 } | |
79 | |
80 public void setName(String name) { | |
81 this.name = name; | |
82 } | |
83 | |
84 | |
85 @Column(name="KENNUNG", length=11) | |
86 public String getKennung() { | |
87 return this.kennung; | |
88 } | |
89 | |
90 public void setKennung(String kennung) { | |
91 this.kennung = kennung; | |
92 } | |
93 | |
94 | |
95 @Column(name="LAENGE", precision=7, scale=3) | |
96 public BigDecimal getLaenge() { | |
97 return this.laenge; | |
98 } | |
99 | |
100 public void setLaenge(BigDecimal laenge) { | |
101 this.laenge = laenge; | |
102 } | |
103 | |
104 | |
105 @Column(name="EINZUGSGEBIET", precision=10) | |
106 public BigDecimal getEinzugsgebiet() { | |
107 return this.einzugsgebiet; | |
108 } | |
109 | |
110 public void setEinzugsgebiet(BigDecimal einzugsgebiet) { | |
111 this.einzugsgebiet = einzugsgebiet; | |
112 } | |
113 | |
114 | |
115 @Column(name="BEMERKUNG", length=240) | |
116 public String getBemerkung() { | |
117 return this.bemerkung; | |
118 } | |
119 | |
120 public void setBemerkung(String bemerkung) { | |
121 this.bemerkung = bemerkung; | |
122 } | |
123 | |
124 @OneToMany(fetch=FetchType.LAZY, mappedBy="gewaesser") | |
125 public Set<Bezugspegel> getBezugspegels() { | |
126 return this.bezugspegels; | |
127 } | |
128 | |
129 public void setBezugspegels(Set<Bezugspegel> bezugspegels) { | |
130 this.bezugspegels = bezugspegels; | |
131 } | |
132 | |
133 @OneToMany(fetch=FetchType.LAZY, mappedBy="gewaesser") | |
134 public Set<Station> getStations() { | |
135 return this.stations; | |
136 } | |
137 | |
138 public void setStations(Set<Station> stations) { | |
139 this.stations = stations; | |
140 } | |
141 | |
142 | |
143 | |
144 | |
145 } | |
146 | |
147 |