changeset 2822:212c33c9a5e2

Added missing annotation in MorphologicalWidth for values. flys-backend/trunk@4239 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 13 Apr 2012 13:27:09 +0000
parents 0a536eb5d668
children 13b3fcaa1b34
files flys-backend/ChangeLog flys-backend/src/main/java/de/intevation/flys/importer/ImportMorphWidthValue.java flys-backend/src/main/java/de/intevation/flys/model/MorphologicalWidth.java
diffstat 3 files changed, 11 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/ChangeLog	Fri Apr 13 13:22:54 2012 +0000
+++ b/flys-backend/ChangeLog	Fri Apr 13 13:27:09 2012 +0000
@@ -1,3 +1,11 @@
+2012-04-13  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/model/MorphologicalWidth.java: Added
+	  annotation for values.
+
+	* src/main/java/de/intevation/flys/importer/ImportMorphWidthValue.java:
+	  Removed debug output in getPeer() and storeDependencies().
+
 2012-04-13  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/importer/parsers/MorphologicalWidthParser.java:
--- a/flys-backend/src/main/java/de/intevation/flys/importer/ImportMorphWidthValue.java	Fri Apr 13 13:22:54 2012 +0000
+++ b/flys-backend/src/main/java/de/intevation/flys/importer/ImportMorphWidthValue.java	Fri Apr 13 13:27:09 2012 +0000
@@ -38,15 +38,11 @@
 
 
     public void storeDependencies(MorphologicalWidth parent) {
-        log.info("store dependencies");
-
         getPeer(parent);
     }
 
 
     public MorphologicalWidthValue getPeer(MorphologicalWidth parent) {
-        log.info("get peer");
-
         if (peer == null) {
             Session session = ImporterSession.getInstance().getDatabaseSession();
 
@@ -65,8 +61,6 @@
             List<MorphologicalWidthValue> values = query.list();
 
             if (values.isEmpty()) {
-                log.debug("Create new MorphologicalWidthValue DB instance.");
-
                 peer = new MorphologicalWidthValue(
                     parent,
                     station,
--- a/flys-backend/src/main/java/de/intevation/flys/model/MorphologicalWidth.java	Fri Apr 13 13:22:54 2012 +0000
+++ b/flys-backend/src/main/java/de/intevation/flys/model/MorphologicalWidth.java	Fri Apr 13 13:27:09 2012 +0000
@@ -11,6 +11,7 @@
 import javax.persistence.SequenceGenerator;
 import javax.persistence.GenerationType;
 import javax.persistence.JoinColumn;
+import javax.persistence.OneToMany;
 import javax.persistence.OneToOne;
 
 
@@ -74,6 +75,8 @@
         this.unit = unit;
     }
 
+    @OneToMany
+    @JoinColumn(name = "morphologic_width_id")
     public List<MorphologicalWidthValue> getValues() {
         return values;
     }

http://dive4elements.wald.intevation.org