Mercurial > dive4elements > gnv-client
annotate geo-backend/src/main/java/de/intevation/gnv/geobackend/base/query/QueryExecutor.java @ 897:02cd2935b5fa
Removed trailing whitespace.
geo-backend/trunk@1013 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 28 Apr 2010 07:04:19 +0000 |
parents | eb777022b628 |
children | ebeb56428409 |
rev | line source |
---|---|
132
5a583cff97ea
Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.gnv.geobackend.base.query; |
5a583cff97ea
Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
2 |
895
eb777022b628
Integrated a CacheCleaner that will cleanup the SQL-Cache if necessary
Tim Englich <tim.englich@intevation.de>
parents:
887
diff
changeset
|
3 import java.util.Collection; |
eb777022b628
Integrated a CacheCleaner that will cleanup the SQL-Cache if necessary
Tim Englich <tim.englich@intevation.de>
parents:
887
diff
changeset
|
4 |
886
8b442223741c
Ordered imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
541
diff
changeset
|
5 import de.intevation.gnv.geobackend.base.Result; |
132
5a583cff97ea
Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
6 import de.intevation.gnv.geobackend.base.query.exception.QueryException; |
5a583cff97ea
Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
7 |
5a583cff97ea
Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
8 /** |
5a583cff97ea
Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
9 * This Interface provides the Method to execute Queries |
5a583cff97ea
Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
10 * against a Datastore eg. Databases |
887
b757def3ff55
Bring @author javadoc tags in form '@author <a href="john.doe@example.com">John Doe</a>'
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
886
diff
changeset
|
11 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> |
132
5a583cff97ea
Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
12 * |
5a583cff97ea
Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
13 */ |
5a583cff97ea
Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
14 public interface QueryExecutor { |
5a583cff97ea
Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
15 |
5a583cff97ea
Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
16 |
5a583cff97ea
Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
17 /** |
5a583cff97ea
Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
18 * This Method executes the Query an returns the Result |
5a583cff97ea
Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
19 * in an Collection. |
5a583cff97ea
Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
20 * @param queryID the ID of the Query which should be used. |
5a583cff97ea
Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
21 * @param filter the Filterarguments to limit the Data |
5a583cff97ea
Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
22 * @return the fetched Values |
5a583cff97ea
Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
23 * @throws QueryException |
5a583cff97ea
Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
24 */ |
897
02cd2935b5fa
Removed trailing whitespace.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
895
diff
changeset
|
25 Collection<Result> executeQuery(String queryID, |
02cd2935b5fa
Removed trailing whitespace.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
895
diff
changeset
|
26 String[] filter) |
895
eb777022b628
Integrated a CacheCleaner that will cleanup the SQL-Cache if necessary
Tim Englich <tim.englich@intevation.de>
parents:
887
diff
changeset
|
27 throws QueryException; |
541
3cbf11c67fdc
Experimental caching of SQL results via Ehache
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
132
diff
changeset
|
28 |
895
eb777022b628
Integrated a CacheCleaner that will cleanup the SQL-Cache if necessary
Tim Englich <tim.englich@intevation.de>
parents:
887
diff
changeset
|
29 /** |
eb777022b628
Integrated a CacheCleaner that will cleanup the SQL-Cache if necessary
Tim Englich <tim.englich@intevation.de>
parents:
887
diff
changeset
|
30 * Returns the cached results to a given Query. |
eb777022b628
Integrated a CacheCleaner that will cleanup the SQL-Cache if necessary
Tim Englich <tim.englich@intevation.de>
parents:
887
diff
changeset
|
31 * @param query the Query that should identify the Result |
eb777022b628
Integrated a CacheCleaner that will cleanup the SQL-Cache if necessary
Tim Englich <tim.englich@intevation.de>
parents:
887
diff
changeset
|
32 * @return the Cached results or null if no results are cached. |
eb777022b628
Integrated a CacheCleaner that will cleanup the SQL-Cache if necessary
Tim Englich <tim.englich@intevation.de>
parents:
887
diff
changeset
|
33 */ |
541
3cbf11c67fdc
Experimental caching of SQL results via Ehache
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
132
diff
changeset
|
34 Collection<Result> cachedResults(String query); |
3cbf11c67fdc
Experimental caching of SQL results via Ehache
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
132
diff
changeset
|
35 |
895
eb777022b628
Integrated a CacheCleaner that will cleanup the SQL-Cache if necessary
Tim Englich <tim.englich@intevation.de>
parents:
887
diff
changeset
|
36 /** |
eb777022b628
Integrated a CacheCleaner that will cleanup the SQL-Cache if necessary
Tim Englich <tim.englich@intevation.de>
parents:
887
diff
changeset
|
37 * Writes the Result into the Cache |
eb777022b628
Integrated a CacheCleaner that will cleanup the SQL-Cache if necessary
Tim Englich <tim.englich@intevation.de>
parents:
887
diff
changeset
|
38 * @param query the Query that will be used as Identifier. |
eb777022b628
Integrated a CacheCleaner that will cleanup the SQL-Cache if necessary
Tim Englich <tim.englich@intevation.de>
parents:
887
diff
changeset
|
39 * @param results The Results that should be cached. |
eb777022b628
Integrated a CacheCleaner that will cleanup the SQL-Cache if necessary
Tim Englich <tim.englich@intevation.de>
parents:
887
diff
changeset
|
40 */ |
541
3cbf11c67fdc
Experimental caching of SQL results via Ehache
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
132
diff
changeset
|
41 void cacheResults(String query, Collection<Result> results); |
895
eb777022b628
Integrated a CacheCleaner that will cleanup the SQL-Cache if necessary
Tim Englich <tim.englich@intevation.de>
parents:
887
diff
changeset
|
42 |
eb777022b628
Integrated a CacheCleaner that will cleanup the SQL-Cache if necessary
Tim Englich <tim.englich@intevation.de>
parents:
887
diff
changeset
|
43 /** |
eb777022b628
Integrated a CacheCleaner that will cleanup the SQL-Cache if necessary
Tim Englich <tim.englich@intevation.de>
parents:
887
diff
changeset
|
44 * Clears the Cache using the Names of the Database-Tables |
eb777022b628
Integrated a CacheCleaner that will cleanup the SQL-Cache if necessary
Tim Englich <tim.englich@intevation.de>
parents:
887
diff
changeset
|
45 * @param tableNames the Tablenames that should be used to Clear the Cache. |
eb777022b628
Integrated a CacheCleaner that will cleanup the SQL-Cache if necessary
Tim Englich <tim.englich@intevation.de>
parents:
887
diff
changeset
|
46 */ |
eb777022b628
Integrated a CacheCleaner that will cleanup the SQL-Cache if necessary
Tim Englich <tim.englich@intevation.de>
parents:
887
diff
changeset
|
47 void clearCache(String[] tableNames); |
132
5a583cff97ea
Implementation of the Datainfrastructure for fetching Data from different DataStores.
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
48 } |