Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/importer/ImportMorphWidthValue.java @ 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 | 0c2567626754 |
children |
comparison
equal
deleted
inserted
replaced
2821:0a536eb5d668 | 2822:212c33c9a5e2 |
---|---|
36 this.description = description; | 36 this.description = description; |
37 } | 37 } |
38 | 38 |
39 | 39 |
40 public void storeDependencies(MorphologicalWidth parent) { | 40 public void storeDependencies(MorphologicalWidth parent) { |
41 log.info("store dependencies"); | |
42 | |
43 getPeer(parent); | 41 getPeer(parent); |
44 } | 42 } |
45 | 43 |
46 | 44 |
47 public MorphologicalWidthValue getPeer(MorphologicalWidth parent) { | 45 public MorphologicalWidthValue getPeer(MorphologicalWidth parent) { |
48 log.info("get peer"); | |
49 | |
50 if (peer == null) { | 46 if (peer == null) { |
51 Session session = ImporterSession.getInstance().getDatabaseSession(); | 47 Session session = ImporterSession.getInstance().getDatabaseSession(); |
52 | 48 |
53 Query query = session.createQuery( | 49 Query query = session.createQuery( |
54 "from MorphologicalWidthValue where " + | 50 "from MorphologicalWidthValue where " + |
63 query.setParameter("description", description); | 59 query.setParameter("description", description); |
64 | 60 |
65 List<MorphologicalWidthValue> values = query.list(); | 61 List<MorphologicalWidthValue> values = query.list(); |
66 | 62 |
67 if (values.isEmpty()) { | 63 if (values.isEmpty()) { |
68 log.debug("Create new MorphologicalWidthValue DB instance."); | |
69 | |
70 peer = new MorphologicalWidthValue( | 64 peer = new MorphologicalWidthValue( |
71 parent, | 65 parent, |
72 station, | 66 station, |
73 width, | 67 width, |
74 description | 68 description |