Mercurial > dive4elements > river
comparison flys-backend/src/main/java/de/intevation/flys/importer/ImportAnnotation.java @ 497:67fd63e4ef66
Importer: centralized caching
flys-backend/trunk@1851 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sun, 08 May 2011 15:29:45 +0000 |
parents | 003ac16812dd |
children | 9f2204ed79ed |
comparison
equal
deleted
inserted
replaced
496:4f2d8980415f | 497:67fd63e4ef66 |
---|---|
77 public Annotation getPeer(River river) { | 77 public Annotation getPeer(River river) { |
78 if (peer == null) { | 78 if (peer == null) { |
79 Range r = range.getPeer(river); | 79 Range r = range.getPeer(river); |
80 Attribute a = attribute.getPeer(); | 80 Attribute a = attribute.getPeer(); |
81 Position p = position.getPeer(); | 81 Position p = position.getPeer(); |
82 Session session = Importer.sessionHolder.get(); | 82 Session session = ImporterSession.getInstance().getDatabaseSession(); |
83 Query query = session.createQuery( | 83 Query query = session.createQuery( |
84 "from Annotation where " + | 84 "from Annotation where " + |
85 "range=:range and attribute=:attribute and position=:position"); | 85 "range=:range and attribute=:attribute and position=:position"); |
86 query.setParameter("range", r); | 86 query.setParameter("range", r); |
87 query.setParameter("attribute", a); | 87 query.setParameter("attribute", a); |