annotate flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/FixingsColumnFactory.java @ 2615:b0597a63fe70

More code for the fixings km chart service. flys-artifacts/trunk@4199 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 04 Apr 2012 18:30:44 +0000
parents
children 6ed24efc80de
rev   line source
2615
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
1 package de.intevation.flys.artifacts.model;
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
2
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
3 import de.intevation.flys.artifacts.model.FixingsOverview.Fixing;
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
4
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
5 public class FixingsColumnFactory
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
6 {
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
7 public static final String CACHE_NAME = "fixing-columns";
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
8
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
9 public static final String SQL_COLUMN_W =
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
10 "SELECT wcv.position AS km, wcv.w AS w " +
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
11 "FROM wst_column_values wcv " +
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
12 "WHERE wst_column_id = :column_id " +
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
13 "ORDER by wcv.position";
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
14
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
15 public static final String SQL_COLUMN_Q =
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
16 "SELECT wqr.q AS q, r.a AS a, r.b AS b " +
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
17 "FROM wst_column_q_ranges wcqr " +
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
18 "JOIN wst_q_ranges wqr ON wcqr.wst_q_range_id = wqr.id " +
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
19 "JOIN ranges r ON wqr.range_id = r.id " +
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
20 "WHERE wcqr.wst_column_id = :column_id ORDER by r.a";
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
21
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
22 public static final FixingsColumnFactory INSTANCE =
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
23 new FixingsColumnFactory();
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
24
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
25 private FixingsColumnFactory() {
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
26 }
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
27
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
28 public FixingsColumn getColumnData(Fixing.Column column) {
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
29 // TODO: Implement me!
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
30 return null;
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
31 }
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
32 }
b0597a63fe70 More code for the fixings km chart service.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
33 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org