# HG changeset patch # User Sascha L. Teichmann # Date 1300985225 0 # Node ID bfee0e05b4e78a1efcdc92a4456526e8b108535c # Parent 29a408f80a891364dd3adb3e3d9b09daeec79cb5 Added an one to many relation to the discharge tables of a gauge. flys-backend/trunk@1560 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 29a408f80a89 -r bfee0e05b4e7 flys-backend/ChangeLog --- a/flys-backend/ChangeLog Wed Mar 23 16:33:36 2011 +0000 +++ b/flys-backend/ChangeLog Thu Mar 24 16:47:05 2011 +0000 @@ -1,3 +1,8 @@ +2011-03-24 Sascha L. Teichmann + + * src/main/java/de/intevation/flys/model/Gauge.java: + Added an one to many relation to the discharge tables of a gauge. + 2011-03-22 Sascha L. Teichmann Finished import of WSTs. diff -r 29a408f80a89 -r bfee0e05b4e7 flys-backend/src/main/java/de/intevation/flys/model/Gauge.java --- a/flys-backend/src/main/java/de/intevation/flys/model/Gauge.java Wed Mar 23 16:33:36 2011 +0000 +++ b/flys-backend/src/main/java/de/intevation/flys/model/Gauge.java Thu Mar 24 16:47:05 2011 +0000 @@ -4,6 +4,8 @@ import java.io.Serializable; +import java.util.List; + import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; @@ -13,6 +15,7 @@ import javax.persistence.GenerationType; import javax.persistence.JoinColumn; import javax.persistence.OneToOne; +import javax.persistence.OneToMany; @Entity @Table(name = "gauges") @@ -27,6 +30,8 @@ private BigDecimal datum; private Range range; + private List dischargeTables; + public Gauge() { } @@ -118,5 +123,15 @@ public void setRange(Range range) { this.range = range; } + + @OneToMany + @JoinColumn(name = "gauge_id") + public List getDischargeTables() { + return dischargeTables; + } + + public void setDischargeTables(List dischargeTables) { + this.dischargeTables = dischargeTables; + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :