view 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
line wrap: on
line source
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);
}

http://dive4elements.wald.intevation.org