See: Description
Class | Description |
---|---|
AbstractClassIdsOptionsQuery |
simple abstract class that provides a common
Definitions containing:
IdsQueryParameterDef and
ClassQueryParameterDef . |
ClassQuerySource |
creates a query based on the id string by interpreting it as a Class.
|
CollectionCountQueryDefinition |
counts the number of members in a collection.
|
CollectionQueryParameterDef |
extension of
QueryParameterDef which restricts the
type to a
Collection , and specifies the element types of that
Collection. |
Definitions |
container for
QueryParameterDef instances. |
Hierarchy |
single-point of entry for walking of OME container hierarchies.
|
HierarchyNavigator |
Query the database for relationships between model objects.
|
HierarchyNavigatorWrap<T,E> |
Convenience class for creating versions of
HierarchyNavigator with different model object representations. |
IObjectClassQuery |
simple query subclass which uses the
Parameters.CLASS
parameter value to create a Criteria and then adds
Expression instances based on all other
parameter names. |
NullQuerySource |
always returns null for any id.
|
PojosFindAnnotationsQueryDefinition | |
PojosFindHierarchiesQueryDefinition |
walks up the hierarchy tree starting at
Image nodes
while fetching various information. |
PojosGetImagesByOptionsQueryDefinition | |
PojosGetImagesQueryDefinition | |
PojosGetUserImagesQueryDefinition | |
PojosLoadHierarchyQueryDefinition | |
Query<T> |
base Query type to facilitate the creation of ORM queries.
|
QueryFactory |
query locator which is configured by Spring.
|
QueryParameterDef |
definition of a slot into which a
QueryParameter must
fit. |
QuerySource |
contract for any source of
queries . |
StringQuery |
simple HQL query.
|
StringQuerySource |
interprets the query id as an HQL query.
|
Exception | Description |
---|---|
QueryException |
something failed in looking up a query
|
ORM solutions like Hibernate, TopLink, and JDO provide mechanisms for storing
queries by name for faster lookups. Producing parameterizable queries,
however, is far more difficult. The query
package intends to make
writing such queries as easy as possible.
Effort has been placed into making certain activities, like walking (and fetching) OME hierarchies simpler. These queries are used heavily by the IContainer interface. Also, having this work available in code rather than the Strings of previous methods (XML files, Velocity templates, etc.) allows for significantly more reuse and easier re-factoring.
A second design goal is allowing clients to write queries themselves. Parameters allow for the passing of arbitrary arguments (like named arguments in dynamic languages), and the QueryFactory#lookup mechanism allows for a wide variety of client-definition styles. Probably the most useful is the saving of a QueryDefinition using IUpdate, and the subsequent lookup referring to the queryName. (NYI)
QueryFactory factory = new QueryFactory(new StringQuerySource());
Query q = factory.lookup("select p from Project p",null);
List allProjects = (List) iQuery.execute( q );
QueryFactory factory = new QueryFactory(new ClassNameSource());
Query subclassQ = factory.lookup(PojosFindAnnotationsQueryDefinition.class.getName(),
new Parameters().addIds(Collections.singleton(1L)).addClass(Image.class));
Query datasetQ = factory.lookup(Dataset.class,
new Parameters( new Filter().unique() ).addString("name","16.3093-A93"));
List imageAnnotations = (List) iQuery.execute( subclassQ );
Dataset dataset = (Dataset) iQuery.execute(datasetQ);
IContainer
,
LocalQuery
,
Criteria
,
Query
Version: 5.3.5-ice35-b73
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.