Class QueryFactory


  • public class QueryFactory
    extends java.lang.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
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected QuerySource[] sources
      sources available for lookups.
    • Constructor Summary

      Constructors 
      Constructor Description
      QueryFactory​(QuerySource... querySources)
      main constructor which takes a non-null array of query sources as its only argument.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> Query<T> lookup​(java.lang.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​(java.lang.String queryID,
                                   ome.parameters.Parameters params)
        Type Parameters:
        T -
        Parameters:
        queryID -
        params -
        Returns:
        See above.