Mercurial > dive4elements > gnv-client
diff 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 |
line wrap: on
line diff
--- a/geo-backend/src/main/java/de/intevation/gnv/geobackend/base/query/QueryExecutor.java Sun Apr 18 09:22:38 2010 +0000 +++ b/geo-backend/src/main/java/de/intevation/gnv/geobackend/base/query/QueryExecutor.java Tue Apr 20 12:42:17 2010 +0000 @@ -1,11 +1,10 @@ package de.intevation.gnv.geobackend.base.query; +import java.util.Collection; + import de.intevation.gnv.geobackend.base.Result; - import de.intevation.gnv.geobackend.base.query.exception.QueryException; -import java.util.Collection; - /** * This Interface provides the Method to execute Queries * against a Datastore eg. Databases @@ -23,9 +22,27 @@ * @return the fetched Values * @throws QueryException */ - Collection<Result> executeQuery(String queryID, String[] filter) throws QueryException; + Collection<Result> executeQuery(String queryID, + String[] filter) + throws QueryException; + /** + * Returns the cached results to a given Query. + * @param query the Query that should identify the Result + * @return the Cached results or null if no results are cached. + */ Collection<Result> cachedResults(String query); + /** + * Writes the Result into the Cache + * @param query the Query that will be used as Identifier. + * @param results The Results that should be cached. + */ void cacheResults(String query, Collection<Result> results); + + /** + * Clears the Cache using the Names of the Database-Tables + * @param tableNames the Tablenames that should be used to Clear the Cache. + */ + void clearCache(String[] tableNames); }