Interface CannedQuery<R>

Type Parameters:
R - the query result type
All Known Implementing Classes:
AbstractCannedQuery

public interface CannedQuery<R>
Interface for named query implementations. These are queries that encapsulate varying degrees of functionality, but ultimately provide support for paging results.

Note that each instance of the query is stateful and cannot be reused.

Since:
4.0
Author:
Derek Hulley
  • Method Details

    • getParameters

      CannedQueryParameters getParameters()
      Get the original parameters used to generate the query.
      Returns:
      the parameters used to obtain the named query.
    • execute

      CannedQueryResults<R> execute()
      Execute the named query, which was provided to support the parameters originally provided.

      Note: This method can only be used once; to requery, get a new instance from the factory.

      Returns:
      the query results
      Throws:
      IllegalStateException - on second and subsequent calls to this method