|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.common.clients.queries.AbstractQuery<A,R>
A - the type of service addressesR - the type of query resultspublic abstract class AbstractQuery<A,R>
Partial implementation of Querys.
| Constructor Summary | |
|---|---|
protected |
AbstractQuery(ProxyPlugin<A,?,?> plugin)
Creates an instance with a ISFacade, a PluginAdapter, and a type of IS queries |
| Method Summary | |
|---|---|
void |
addCondition(String property,
String value)
Adds a condition to the query. |
protected abstract A |
address(R result)
Returns an endpoint address from a query result. |
boolean |
equals(Object obj)
|
List<A> |
fire()
Executes the query. |
protected abstract List<R> |
fire(Map<String,String> conditions)
Executes the query through implementation-specific means. |
int |
hashCode()
|
protected ProxyPlugin<A,?,?> |
plugin()
Returns the ProxyPlugin. |
void |
setMatcher(ResultMatcher<R> matcher)
Sets an ResultMatcher for the query. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected AbstractQuery(ProxyPlugin<A,?,?> plugin)
ISFacade, a PluginAdapter, and a type of IS queries
facade - the facadeplugin - the pluginqueryClass - the query type| Method Detail |
|---|
public void addCondition(String property,
String value)
property - an expression that identifies a property of service endpointsvalue - the value of the propertypublic void setMatcher(ResultMatcher<R> matcher)
ResultMatcher for the query.
matcher - the matcher.
public final List<A> fire()
throws DiscoveryException
Query
fire in interface Query<A>DiscoveryException - if query execution fails
protected abstract List<R> fire(Map<String,String> conditions)
throws DiscoveryException
conditions - the conditions to apply on the query prior to its execution
DiscoveryException - if the query could not be executed
protected abstract A address(R result)
throws IllegalArgumentException
result - the result
IllegalArgumentException - if an address cannot be derived from the resultprotected ProxyPlugin<A,?,?> plugin()
ProxyPlugin.
public final boolean equals(Object obj)
equals in interface Query<A>equals in class Objectpublic final int hashCode()
hashCode in interface Query<A>hashCode in class Objectpublic final String toString()
toString in interface Query<A>toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||