ome.services.query
Class QueryFactory

java.lang.Object
  extended by ome.services.query.QueryFactory

public class QueryFactory
extends Object

query locator which is configured by Spring. A QueryFactory instance is created in the ome/services/services.xml Spring config and is injected with multiple "query sources". The lookup proceeds through the available query sources calling querySource.lookup(), and returns the first non-null result. If no result is found, an exception is thrown.

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

Field Summary
protected  QuerySource[] sources
          sources available for lookups.
 
Constructor Summary
QueryFactory(QuerySource... querySources)
          main constructor which takes a non-null array of query sources as its only argument.
 
Method Summary
<T> Query<T>
lookup(String queryID, ome.parameters.Parameters params)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sources

protected QuerySource[] sources
sources available for lookups. This array will never be null.

Constructor Detail

QueryFactory

public QueryFactory(QuerySource... querySources)
main constructor which takes a non-null array of query sources as its only argument. This array is copied, so modifications will not be noticed.

Parameters:
querySources - Array of query sources. Not null.
Method Detail

lookup

public <T> Query<T> lookup(String queryID,
                           ome.parameters.Parameters params)
Type Parameters:
T -
Parameters:
queryID -
params -
Returns:


OmeroJava Api

Version: Beta4.2.1-r8614-Beta4.2-b41

Copyright © 2009 The University of Dundee. All Rights Reserved.