Class StringQuerySource


  • public class StringQuerySource
    extends QuerySource
    interprets the query id as an HQL query. In this implementation, no parsing is done at lookup or creation-time, but an implementation which does so is conceivable. The id itself is added to the list of parameters with the name StringQuery.STRING This query source should be placed at the end of the array of query sources provided to QueryFactory because it will always return a Query regardless of the id. An exception will be thrown at execution time if the HQL is invalid.
    Since:
    OMERO 3.0
    • Constructor Summary

      Constructors 
      Constructor Description
      StringQuerySource()
      Default constructor, used primarily for testing.
      StringQuerySource​(ome.util.SqlAction sql)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Query 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

      • StringQuerySource

        public StringQuerySource()
        Default constructor, used primarily for testing. Passes as null SqlAction to created StringQuery instances.
      • StringQuerySource

        public StringQuerySource​(ome.util.SqlAction sql)
    • Method Detail

      • lookup

        public Query lookup​(java.lang.String queryID,
                            ome.parameters.Parameters parameters)
        Description copied from class: QuerySource
        map the queryID argument to some Query instance (including null). This mapping can be dependent on the provided Parameters
        Specified by:
        lookup in class QuerySource
        Parameters:
        queryID - abstract identifier for the sought query.
        parameters - named parameters for lookup and actual bindings.
        Returns:
        A possible null Query for later execution.