Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/main/java/de/intevation/gnv/state/cache/QueryObject.java @ 856:c9996913ff4b
Adjusted the subtitle creation for charts in 'Horizontalen Schnittprofilen' (see issue138).
gnv-artifacts/trunk@974 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 23 Apr 2010 12:26:31 +0000 |
parents | 797a6264b89b |
children | af53410ad551 |
rev | line source |
---|---|
845
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1 /** |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
2 * |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
3 */ |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
4 package de.intevation.gnv.state.cache; |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
5 /** |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
6 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
7 * |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
8 */ |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
9 public class QueryObject { |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
10 |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
11 /** |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
12 * The Id of the State the Query belongs to |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
13 */ |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
14 private String stateId = null; |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
15 |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
16 /** |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
17 * The Query which belongs to the State |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
18 */ |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
19 private String query = null; |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
20 |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
21 /** |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
22 * Constructor |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
23 * @param stateId the Id of the State the Query belongs to |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
24 * @param query the Query which belongs to the State |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
25 */ |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
26 public QueryObject(String stateId, String query) { |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
27 this.stateId = stateId; |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
28 this.query = query.toUpperCase(); |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
29 } |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
30 |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
31 /** |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
32 * Returns the StateId |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
33 * @return the Stateid |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
34 */ |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
35 public String getStateId() { |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
36 return stateId; |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
37 } |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
38 |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
39 /** |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
40 * Returns the Querystring |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
41 * @return the QueryString |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
42 */ |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
43 public String getQuery() { |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
44 return query; |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
45 } |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
46 |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
47 /** |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
48 * Returns true if the given Name of the Table is Contained in the Query |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
49 * @param tableName the Name of the Table |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
50 * @return true if the Name of the Table is contained in the Query |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
51 */ |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
52 public boolean queryContainsTableName(String tableName){ |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
53 return this.query.contains(tableName); |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
54 } |
797a6264b89b
Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
55 } |