tim@132: package de.intevation.gnv.geobackend.base.query; tim@132: tim@895: import java.util.Collection; tim@895: sascha@886: import de.intevation.gnv.geobackend.base.Result; tim@132: import de.intevation.gnv.geobackend.base.query.exception.QueryException; tim@132: tim@132: /** tim@132: * This Interface provides the Method to execute Queries tim@132: * against a Datastore eg. Databases sascha@887: * @author Tim Englich tim@132: * tim@132: */ tim@132: public interface QueryExecutor { tim@132: tim@132: tim@132: /** tim@132: * This Method executes the Query an returns the Result tim@132: * in an Collection. tim@132: * @param queryID the ID of the Query which should be used. tim@132: * @param filter the Filterarguments to limit the Data tim@132: * @return the fetched Values tim@132: * @throws QueryException tim@132: */ ingo@897: Collection executeQuery(String queryID, ingo@897: String[] filter) tim@895: throws QueryException; sascha@541: tim@895: /** tim@895: * Returns the cached results to a given Query. tim@895: * @param query the Query that should identify the Result tim@895: * @return the Cached results or null if no results are cached. tim@895: */ sascha@541: Collection cachedResults(String query); sascha@541: tim@895: /** tim@895: * Writes the Result into the Cache tim@895: * @param query the Query that will be used as Identifier. tim@895: * @param results The Results that should be cached. tim@895: */ sascha@541: void cacheResults(String query, Collection results); tim@895: tim@895: /** tim@895: * Clears the Cache using the Names of the Database-Tables tim@895: * @param tableNames the Tablenames that should be used to Clear the Cache. tim@895: */ tim@895: void clearCache(String[] tableNames); tim@132: }