annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/AnnotationsFactory.java @ 3785:a5f65e8983be

Merged revisions 5501-5502,5504-5508,5511-5513,5516-5519 via svnmerge from file:///home/clients/bsh/bsh-generischer-viewer/Material/SVN/flys-artifacts/trunk ........ r5501 | felix | 2012-09-18 11:49:45 +0200 (Di, 18 Sep 2012) | 1 line fix issue865 - missing showarea theme prop. ........ r5502 | clins | 2012-09-18 12:18:30 +0200 (Di, 18 Sep 2012) | 1 line Add robustness checks to prevent NPEs ........ r5504 | felix | 2012-09-18 14:03:15 +0200 (Di, 18 Sep 2012) | 1 line i18n for area label (fix issue487). ........ r5505 | clins | 2012-09-18 16:19:59 +0200 (Di, 18 Sep 2012) | 1 line Update themes to show point descriptions ........ r5506 | rrenkert | 2012-09-18 17:00:30 +0200 (Di, 18 Sep 2012) | 3 lines Removed incorrect characteristic diameter. ........ r5507 | rrenkert | 2012-09-18 17:03:20 +0200 (Di, 18 Sep 2012) | 3 lines Fixed some stupid bugs in bed quality data factory and calculation. ........ r5508 | teichmann | 2012-09-18 17:45:49 +0200 (Di, 18 Sep 2012) | 1 line The usual whitespace and import cleanups. ........ r5511 | teichmann | 2012-09-18 18:24:51 +0200 (Di, 18 Sep 2012) | 1 line Use generics aware Collections.emptyList(). ........ r5512 | teichmann | 2012-09-18 20:36:52 +0200 (Di, 18 Sep 2012) | 1 line Some more little steps towards "Auslagerung extremer Wasserspiegellagen". ........ r5513 | clins | 2012-09-18 23:38:19 +0200 (Di, 18 Sep 2012) | 1 line A and B facets of fix analyis are now deactivated by default ........ r5516 | bricks | 2012-09-19 10:45:51 +0200 (Mi, 19 Sep 2012) | 2 lines Add the gauge station to the GaugeOverviewInfoService xml response ........ r5517 | rrenkert | 2012-09-19 10:50:23 +0200 (Mi, 19 Sep 2012) | 3 lines Added CSV export to bed quality calculation. ........ r5518 | bricks | 2012-09-19 11:04:04 +0200 (Mi, 19 Sep 2012) | 2 lines Fix date in changelog entry ........ r5519 | teichmann | 2012-09-19 11:17:14 +0200 (Mi, 19 Sep 2012) | 1 line Removed trailing whitespace. ........ flys-artifacts/tags/2.9.1@5531 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 19 Sep 2012 14:58:31 +0000
parents 97a25b54eea3
children 6ed8ebd48d6e
rev   line source
301
1a00cb4998a8 Implemented a service that retrieves distance information for a specific river.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.artifacts.model;
1a00cb4998a8 Implemented a service that retrieves distance information for a specific river.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
2
1031
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
3 import java.math.BigDecimal;
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
4
301
1a00cb4998a8 Implemented a service that retrieves distance information for a specific river.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
5 import java.util.List;
644
02c0cce0e469 Introduce a cache for the distance-info service
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 332
diff changeset
6 import java.util.Iterator;
1924
57b03b3ab15c Optimize query to fix annotations fetching on oracle, by Sascha Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1031
diff changeset
7 import java.util.Collections;
301
1a00cb4998a8 Implemented a service that retrieves distance information for a specific river.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
8
315
94c176fdcb89 Removed the SessionHolder and adapted imports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 311
diff changeset
9 import de.intevation.flys.backend.SessionHolder;
301
1a00cb4998a8 Implemented a service that retrieves distance information for a specific river.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10 import de.intevation.flys.model.Annotation;
1a00cb4998a8 Implemented a service that retrieves distance information for a specific river.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
11 import de.intevation.flys.model.Range;
1a00cb4998a8 Implemented a service that retrieves distance information for a specific river.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
12 import de.intevation.flys.model.River;
1a00cb4998a8 Implemented a service that retrieves distance information for a specific river.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13
1a00cb4998a8 Implemented a service that retrieves distance information for a specific river.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14 import org.hibernate.Session;
1a00cb4998a8 Implemented a service that retrieves distance information for a specific river.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15 import org.hibernate.Query;
1a00cb4998a8 Implemented a service that retrieves distance information for a specific river.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16
1a00cb4998a8 Implemented a service that retrieves distance information for a specific river.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
17 /**
1a00cb4998a8 Implemented a service that retrieves distance information for a specific river.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
18 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
1a00cb4998a8 Implemented a service that retrieves distance information for a specific river.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
19 */
1a00cb4998a8 Implemented a service that retrieves distance information for a specific river.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
20 public class AnnotationsFactory {
1a00cb4998a8 Implemented a service that retrieves distance information for a specific river.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
21
1031
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
22 /**
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
23 * Get Annotations which do not have a "b" ("to")-value set.
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
24 *
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
25 * @param river name of the river of interest.
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
26 *
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
27 * @return List of Annotations for river which have only "a" ("from")
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
28 * value set.
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
29 */
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
30 public static List<Annotation> getPointAnnotations(String river) {
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
31 Session session = SessionHolder.HOLDER.get();
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
32
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
33 Query query = session.createQuery(
1925
01f2473e362d Fixed flys/411 (Oracle max expressions for annotations query).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1924
diff changeset
34 "from Annotation as an " +
01f2473e362d Fixed flys/411 (Oracle max expressions for annotations query).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1924
diff changeset
35 "where an.range.b = null and an.range.river.name=:name " +
01f2473e362d Fixed flys/411 (Oracle max expressions for annotations query).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1924
diff changeset
36 "order by range.a");
01f2473e362d Fixed flys/411 (Oracle max expressions for annotations query).
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1924
diff changeset
37 query.setParameter("name", river);
1031
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
38 return query.list();
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
39 }
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
40
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
41
1924
57b03b3ab15c Optimize query to fix annotations fetching on oracle, by Sascha Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1031
diff changeset
42 public static List<Annotation> getAnnotations(River river) {
311
ea3a438a7021 Backend access: Static methods are using the SessionHolder, too.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 301
diff changeset
43 Session session = SessionHolder.HOLDER.get();
301
1a00cb4998a8 Implemented a service that retrieves distance information for a specific river.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
44
311
ea3a438a7021 Backend access: Static methods are using the SessionHolder, too.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 301
diff changeset
45 Query query = session.createQuery(
1924
57b03b3ab15c Optimize query to fix annotations fetching on oracle, by Sascha Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1031
diff changeset
46 "from Annotation as an where an.range.river = :river" +
57b03b3ab15c Optimize query to fix annotations fetching on oracle, by Sascha Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1031
diff changeset
47 " order by an.range.a");
57b03b3ab15c Optimize query to fix annotations fetching on oracle, by Sascha Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1031
diff changeset
48 query.setParameter("river", river);
311
ea3a438a7021 Backend access: Static methods are using the SessionHolder, too.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 301
diff changeset
49 return query.list();
301
1a00cb4998a8 Implemented a service that retrieves distance information for a specific river.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
50 }
644
02c0cce0e469 Introduce a cache for the distance-info service
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 332
diff changeset
51
2063
97a25b54eea3 Part 1 of #125: added a description for a location to the WaterlevelExport.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1925
diff changeset
52
97a25b54eea3 Part 1 of #125: added a description for a location to the WaterlevelExport.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1925
diff changeset
53 public static Annotation getAnnotation(String river, double km) {
97a25b54eea3 Part 1 of #125: added a description for a location to the WaterlevelExport.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1925
diff changeset
54 Session session = SessionHolder.HOLDER.get();
97a25b54eea3 Part 1 of #125: added a description for a location to the WaterlevelExport.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1925
diff changeset
55
97a25b54eea3 Part 1 of #125: added a description for a location to the WaterlevelExport.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1925
diff changeset
56 Query query = session.createQuery(
97a25b54eea3 Part 1 of #125: added a description for a location to the WaterlevelExport.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1925
diff changeset
57 "from Annotation as a " +
97a25b54eea3 Part 1 of #125: added a description for a location to the WaterlevelExport.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1925
diff changeset
58 "where a.range.river.name = :river AND a.range.a = :km");
97a25b54eea3 Part 1 of #125: added a description for a location to the WaterlevelExport.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1925
diff changeset
59
97a25b54eea3 Part 1 of #125: added a description for a location to the WaterlevelExport.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1925
diff changeset
60 query.setParameter("river", river);
97a25b54eea3 Part 1 of #125: added a description for a location to the WaterlevelExport.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1925
diff changeset
61 query.setParameter("km", BigDecimal.valueOf(km));
97a25b54eea3 Part 1 of #125: added a description for a location to the WaterlevelExport.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1925
diff changeset
62
97a25b54eea3 Part 1 of #125: added a description for a location to the WaterlevelExport.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1925
diff changeset
63 List<Annotation> result = query.list();
97a25b54eea3 Part 1 of #125: added a description for a location to the WaterlevelExport.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1925
diff changeset
64
97a25b54eea3 Part 1 of #125: added a description for a location to the WaterlevelExport.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1925
diff changeset
65 return result != null && result.size() > 0 ? result.get(0) : null;
97a25b54eea3 Part 1 of #125: added a description for a location to the WaterlevelExport.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1925
diff changeset
66 }
97a25b54eea3 Part 1 of #125: added a description for a location to the WaterlevelExport.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1925
diff changeset
67
97a25b54eea3 Part 1 of #125: added a description for a location to the WaterlevelExport.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1925
diff changeset
68
1031
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
69 /**
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
70 * Get minimal "a" ("from") and maximal "b" ("to") value of annotations'
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
71 * ranges of a river.
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
72 *
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
73 * @param river name of the river of interest.
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
74 *
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
75 * @return Array containing minimal "a" and max "b" value of any
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
76 * annotation stored for the given river.
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
77 */
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
78 public static double[] getAnnotationsBreadth(String river) {
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
79 Session session = SessionHolder.HOLDER.get();
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
80
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
81 Query minAQuery = session.createQuery(
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
82 "select min(a), max(b) from Range where river.name=:name");
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
83 minAQuery.setParameter("name", river);
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
84
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
85 double[] minAmaxB = {0.0f, 0.0f};
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
86 Object[] row = (Object[]) minAQuery.list().iterator().next();
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
87 minAmaxB[0] = ((BigDecimal) row[0]).doubleValue();
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
88 minAmaxB[1] = ((BigDecimal) row[1]).doubleValue();
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
89 return minAmaxB;
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
90 }
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
91
bcef54a563ea Added functionality to query range and point-annotations only to
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 644
diff changeset
92
1924
57b03b3ab15c Optimize query to fix annotations fetching on oracle, by Sascha Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1031
diff changeset
93 public static Iterator<Annotation> getAnnotationsIterator(
57b03b3ab15c Optimize query to fix annotations fetching on oracle, by Sascha Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1031
diff changeset
94 String riverName
57b03b3ab15c Optimize query to fix annotations fetching on oracle, by Sascha Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1031
diff changeset
95 ) {
644
02c0cce0e469 Introduce a cache for the distance-info service
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 332
diff changeset
96 Session session = SessionHolder.HOLDER.get();
02c0cce0e469 Introduce a cache for the distance-info service
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 332
diff changeset
97
1924
57b03b3ab15c Optimize query to fix annotations fetching on oracle, by Sascha Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1031
diff changeset
98 Query riverQuery = session.createQuery(
57b03b3ab15c Optimize query to fix annotations fetching on oracle, by Sascha Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1031
diff changeset
99 "from River where name = :name");
57b03b3ab15c Optimize query to fix annotations fetching on oracle, by Sascha Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1031
diff changeset
100 riverQuery.setParameter("name", riverName);
57b03b3ab15c Optimize query to fix annotations fetching on oracle, by Sascha Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1031
diff changeset
101 List<River> rivers = riverQuery.list();
57b03b3ab15c Optimize query to fix annotations fetching on oracle, by Sascha Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1031
diff changeset
102 if (rivers.isEmpty()) {
3785
a5f65e8983be Merged revisions 5501-5502,5504-5508,5511-5513,5516-5519 via svnmerge from
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 2063
diff changeset
103 return Collections.<Annotation>emptyList().iterator();
1924
57b03b3ab15c Optimize query to fix annotations fetching on oracle, by Sascha Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1031
diff changeset
104 }
644
02c0cce0e469 Introduce a cache for the distance-info service
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 332
diff changeset
105
02c0cce0e469 Introduce a cache for the distance-info service
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 332
diff changeset
106 Query query = session.createQuery(
1924
57b03b3ab15c Optimize query to fix annotations fetching on oracle, by Sascha Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1031
diff changeset
107 "from Annotation as an" +
57b03b3ab15c Optimize query to fix annotations fetching on oracle, by Sascha Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1031
diff changeset
108 " where an.range.river = :river order by an.range.a");
57b03b3ab15c Optimize query to fix annotations fetching on oracle, by Sascha Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1031
diff changeset
109 query.setParameter("river", rivers.get(0));
57b03b3ab15c Optimize query to fix annotations fetching on oracle, by Sascha Teichmann.
Felix Wolfsteller <felix.wolfsteller@intevation.de>
parents: 1031
diff changeset
110
644
02c0cce0e469 Introduce a cache for the distance-info service
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 332
diff changeset
111 return (Iterator<Annotation>)query.iterate();
02c0cce0e469 Introduce a cache for the distance-info service
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 332
diff changeset
112 }
301
1a00cb4998a8 Implemented a service that retrieves distance information for a specific river.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
113 }
1a00cb4998a8 Implemented a service that retrieves distance information for a specific river.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
114 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org