ome.services.query
Class QuerySource
java.lang.Object
ome.services.query.QuerySource
- Direct Known Subclasses:
- ClassQuerySource, NullQuerySource, StringQuerySource
public abstract class QuerySource
- extends Object
contract for any source of queries
.
Instances should be registered with the
QueryFactory
in the Spring configuration.
QuerySources are reponsible for mapping the given query ID to a Query
instance (possibly dependent on the Parameters
). The
order of sources provided to QueryFactory
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 (see ClassQuerySource
).
- Since:
- OMERO 3.0
- Version:
- 1.0 (Internal version: $Rev: 1167 $ $Date: 2006-12-15 10:39:34 +0000 (Fri, 15 Dec 2006) $)
- Author:
- Josh Moore, josh.moore@gmx.de
Method Summary |
abstract
|
lookup(String queryID,
ome.parameters.Parameters parameters)
map the queryID argument to some Query instance (including null). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
QuerySource
public QuerySource()
lookup
public abstract <T> Query<T> lookup(String queryID,
ome.parameters.Parameters parameters)
- map the queryID argument to some Query instance (including null). This
mapping can be dependent on the provided
Parameters
- 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.
OmeroJava Api
Version: Beta4.2.1-r8614-Beta4.2-b41
Copyright © 2009 The University of Dundee. All Rights Reserved.