Interface QuerySpecification<T>

All Known Subinterfaces:
CursorQuerySpecification<T,C>, MappingCursorQuerySpecification<R,C>, MappingOffsetQuerySpecification<R>, OffsetQuerySpecification<T>
All Known Implementing Classes:
AbstractQuerySpecification

public interface QuerySpecification<T>
Defines a query to execute.
  • Method Summary

    Modifier and Type
    Method
    Description
    Executes the query defined by this QuerySpecification.
    default String
    Retrieves the name associated with this query specification.
    default String
    Retrieves the transaction ID associated with this query specification.
  • Method Details

    • getName

      default String getName()
      Retrieves the name associated with this query specification. Defaults to the simple class name.
      Returns:
      the name of the query specification
    • getTxId

      default String getTxId()
      Retrieves the transaction ID associated with this query specification.
      Returns:
      the transaction ID
    • execute

      QueryResult<T> execute(Connection conn) throws SQLException
      Executes the query defined by this QuerySpecification.
      Parameters:
      conn - the database connection to be used for executing the query
      Returns:
      a QueryResult obtained from executing the query
      Throws:
      SQLException - if a database access error occurs