Package ome.services.query
Class QuerySource
- java.lang.Object
-
- ome.services.query.QuerySource
-
- Direct Known Subclasses:
ClassQuerySource
,NullQuerySource
,StringQuerySource
public abstract class QuerySource extends java.lang.Object
contract for any source ofqueries
. Instances should be registered with theQueryFactory
in the Spring configuration. QuerySources are responsible for mapping the given query ID to a Query instance (possibly dependent on theParameters
). The order of sources provided toQueryFactory
is very important. QuerySources can use any mechanism available to perform the lookup, e.g. a database backend, flat-files, the set of Hibernate named-queries, or concrete classes (seeClassQuerySource
).- Since:
- OMERO 3.0
-
-
Constructor Summary
Constructors Constructor Description QuerySource()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract <T> Query<T>
lookup(java.lang.String queryID, ome.parameters.Parameters parameters)
map the queryID argument to some Query instance (including null).
-
-
-
Method Detail
-
lookup
public abstract <T> Query<T> lookup(java.lang.String queryID, ome.parameters.Parameters parameters)
map the queryID argument to some Query instance (including null). This mapping can be dependent on the providedParameters
- Type Parameters:
T
- the generic type of the return Query. This is usually provided indirectly through the type assignment, e.g. "Query- q =
... "
- Parameters:
queryID
- abstract identifier for the sought query.parameters
- named parameters for lookup and actual bindings.- Returns:
- A possible null Query for later execution.
-
-