Mercurial > dive4elements > river
diff backend/src/main/java/org/dive4elements/river/model/SedimentLoadLS.java @ 8026:4b3054edbbaf
Added Hibernate mappings for new sediment load database model.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 10 Jul 2014 12:04:56 +0200 |
parents | c915e99d9e52 |
children | fd3a24336e6a |
line wrap: on
line diff
--- a/backend/src/main/java/org/dive4elements/river/model/SedimentLoadLS.java Wed Jul 09 18:13:13 2014 +0200 +++ b/backend/src/main/java/org/dive4elements/river/model/SedimentLoadLS.java Thu Jul 10 12:04:56 2014 +0200 @@ -14,6 +14,7 @@ import javax.persistence.Entity; import javax.persistence.Id; +import javax.persistence.OneToMany; import javax.persistence.Table; import javax.persistence.GeneratedValue; import javax.persistence.Column; @@ -22,8 +23,6 @@ import javax.persistence.JoinColumn; import javax.persistence.OneToOne; -import org.apache.log4j.Logger; - /** SedimentYield of a certain Fraction with possibly many values. */ @Entity @@ -31,8 +30,6 @@ public class SedimentLoadLS implements Serializable { - private static Logger logger = Logger.getLogger(SedimentLoadLS.class); - private Integer id; private River river; @@ -51,7 +48,6 @@ public SedimentLoadLS() { - this.values = new ArrayList<SedimentLoadLSValue>(); } public SedimentLoadLS(River river, Unit unit, TimeInterval timeInterval) { @@ -162,5 +158,15 @@ public void setKind(Integer newKind) { this.kind = newKind; } + + @OneToMany + @JoinColumn(name="sediment_yield_id") + public List<SedimentLoadLSValue> getSedimentLoadLSValues() { + return values; + } + + public void setSedimentLoadLSValues(List<SedimentLoadLSValue> values) { + this.values = values; + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :