Mercurial > dive4elements > gnv-client
view geo-backend/src/main/java/de/intevation/gnv/geobackend/base/query/QueryExecutor.java @ 1145:dfe1ac687c7f tip
added tags
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:16:15 +0200 |
parents | ebeb56428409 |
children |
line wrap: on
line source
/* * Copyright (c) 2010 by Intevation GmbH * * This program is free software under the LGPL (>=v2.1) * Read the file LGPL.txt coming with the software for details * or visit http://www.gnu.org/licenses/ if it does not exist. */ 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; /** * This Interface provides the Method to execute Queries * against a Datastore eg. Databases * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> * */ public interface QueryExecutor { /** * This Method executes the Query an returns the Result * in an Collection. * @param queryID the ID of the Query which should be used. * @param filter the Filterarguments to limit the Data * @return the fetched Values * @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); }