comparison geo-backend/src/main/java/de/intevation/gnv/geobackend/base/query/QueryExecutor.java @ 895:eb777022b628

Integrated a CacheCleaner that will cleanup the SQL-Cache if necessary geo-backend/trunk@958 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Tue, 20 Apr 2010 12:42:17 +0000
parents b757def3ff55
children 02cd2935b5fa
comparison
equal deleted inserted replaced
894:d674cef2ca0d 895:eb777022b628
1 package de.intevation.gnv.geobackend.base.query; 1 package de.intevation.gnv.geobackend.base.query;
2 2
3 import java.util.Collection;
4
3 import de.intevation.gnv.geobackend.base.Result; 5 import de.intevation.gnv.geobackend.base.Result;
4
5 import de.intevation.gnv.geobackend.base.query.exception.QueryException; 6 import de.intevation.gnv.geobackend.base.query.exception.QueryException;
6
7 import java.util.Collection;
8 7
9 /** 8 /**
10 * This Interface provides the Method to execute Queries 9 * This Interface provides the Method to execute Queries
11 * against a Datastore eg. Databases 10 * against a Datastore eg. Databases
12 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> 11 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a>
21 * @param queryID the ID of the Query which should be used. 20 * @param queryID the ID of the Query which should be used.
22 * @param filter the Filterarguments to limit the Data 21 * @param filter the Filterarguments to limit the Data
23 * @return the fetched Values 22 * @return the fetched Values
24 * @throws QueryException 23 * @throws QueryException
25 */ 24 */
26 Collection<Result> executeQuery(String queryID, String[] filter) throws QueryException; 25 Collection<Result> executeQuery(String queryID,
26 String[] filter)
27 throws QueryException;
27 28
29 /**
30 * Returns the cached results to a given Query.
31 * @param query the Query that should identify the Result
32 * @return the Cached results or null if no results are cached.
33 */
28 Collection<Result> cachedResults(String query); 34 Collection<Result> cachedResults(String query);
29 35
36 /**
37 * Writes the Result into the Cache
38 * @param query the Query that will be used as Identifier.
39 * @param results The Results that should be cached.
40 */
30 void cacheResults(String query, Collection<Result> results); 41 void cacheResults(String query, Collection<Result> results);
42
43 /**
44 * Clears the Cache using the Names of the Database-Tables
45 * @param tableNames the Tablenames that should be used to Clear the Cache.
46 */
47 void clearCache(String[] tableNames);
31 } 48 }

http://dive4elements.wald.intevation.org