common-gcore-clients/src/main/java/org/gcube/common/clients/gcore/queries/GCoreQuery.java

44 lines
1.3 KiB
Java

package org.gcube.common.clients.gcore.queries;
import org.apache.axis.message.addressing.EndpointReferenceType;
import org.gcube.common.clients.cache.DefaultEndpointCache;
import org.gcube.common.clients.cache.EndpointCache;
import org.gcube.common.clients.gcore.plugins.Plugin;
import org.gcube.common.clients.gcore.plugins.PluginAdapter;
import org.gcube.common.clients.queries.AbstractQuery;
import org.gcube.common.clients.queries.Query;
/**
* Partial implementation of {@link Query}s for gCore services.
*
* @author Fabio Simeoni
*
* @param <R> the type of query results
*/
public abstract class GCoreQuery<R> extends AbstractQuery<EndpointReferenceType, R> {
public static EndpointCache<EndpointReferenceType> globalCache = new DefaultEndpointCache<EndpointReferenceType>();
private final ISFacade facade;
/**
* Creates an instance with a {@link ISFacade}, a {@link PluginAdapter}, and a type of IS queries
* @param facade the facade
* @param plugin the plugin
* @param queryClass the query type
*/
protected GCoreQuery(ISFacade facade, Plugin<?,?> plugin) {
super(plugin);
this.facade=facade;
}
/**
* Returns the {@link ISFacade} used for query execution.
* @return the facade
*/
protected ISFacade facade() {
return facade;
}
}