annotate gnv-artifacts/src/main/java/de/intevation/gnv/state/cache/QueryObject.java @ 1073:902bcd837995

Configured transitions for vector data verticalprofiles. gnv-artifacts/trunk@1170 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 07 Jun 2010 17:15:04 +0000
parents af53410ad551
children f953c9a559d8
rev   line source
845
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
1 package de.intevation.gnv.state.cache;
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
2 /**
1036
af53410ad551 Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 845
diff changeset
3 * This Class is a Container which carries the
af53410ad551 Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 845
diff changeset
4 * databasequery which belongs to an state.
af53410ad551 Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 845
diff changeset
5 * It is also possible to look up if the query contains a specific
af53410ad551 Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 845
diff changeset
6 * TableName.
845
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
7 * @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
8 *
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
9 */
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
10 public class QueryObject {
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 /**
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
13 * 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
14 */
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
15 private String stateId = null;
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 /**
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
18 * The Query which belongs to the State
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
19 */
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
20 private String query = null;
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 /**
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
23 * Constructor
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
24 * @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
25 * @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
26 */
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
27 public QueryObject(String stateId, String query) {
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
28 this.stateId = stateId;
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
29 this.query = query.toUpperCase();
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 /**
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
33 * Returns the StateId
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
34 * @return the Stateid
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
35 */
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
36 public String getStateId() {
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
37 return stateId;
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 /**
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
41 * Returns the Querystring
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
42 * @return the QueryString
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
43 */
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
44 public String getQuery() {
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
45 return query;
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 /**
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
49 * 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
50 * @param tableName the Name of the Table
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
51 * @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
52 */
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
53 public boolean queryContainsTableName(String tableName){
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
54 return this.query.contains(tableName);
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
55 }
797a6264b89b Integrated the CacheCleaner for the ThematicDataCache
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
56 }

http://dive4elements.wald.intevation.org