Class QuerySource

  • Direct Known Subclasses:
    ClassQuerySource, NullQuerySource, StringQuerySource

    public abstract class QuerySource
    extends java.lang.Object
    contract for any source of queries. Instances should be registered with the QueryFactory in the Spring configuration. QuerySources are responsible 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
    • 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).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • QuerySource

        public QuerySource()
    • 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 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.