Interface PagingQueryProvider

All Known Implementing Classes:
AbstractSqlPagingQueryProvider, Db2PagingQueryProvider, H2PagingQueryProvider, HsqlPagingQueryProvider, MariaDbPagingQueryProvider, MySqlPagingQueryProvider, OraclePagingQueryProvider, PostgresPagingQueryProvider, SqlServerPagingQueryProvider

public interface PagingQueryProvider
Interface defining the functionality to be provided for generating paging queries.
Author:
Glenn Renfro
  • Method Summary

    Modifier and Type
    Method
    Description
    getPageQuery(org.springframework.data.domain.Pageable pageable)
    Generate the query that will provide the jump to item query.
    int
    The number of parameters that are declared in the query.
    Map<String,org.springframework.batch.item.database.Order>
    The sort keys.
    void
    init(DataSource dataSource)
    Initialize the query provider using the provided DataSource if necessary.
    boolean
    Indicate whether the generated queries use named parameter syntax.
  • Method Details

    • init

      void init(DataSource dataSource) throws Exception
      Initialize the query provider using the provided DataSource if necessary.
      Parameters:
      dataSource - DataSource to use for any initialization
      Throws:
      Exception - throws Exception if query provider initialize fails.
    • getParameterCount

      int getParameterCount()
      The number of parameters that are declared in the query.
      Returns:
      number of parameters
    • isUsingNamedParameters

      boolean isUsingNamedParameters()
      Indicate whether the generated queries use named parameter syntax.
      Returns:
      true if named parameter syntax is used
    • getSortKeys

      Map<String,org.springframework.batch.item.database.Order> getSortKeys()
      The sort keys. A Map of the columns that make up the key and a Boolean indicating ascending or descending (ascending = true).
      Returns:
      the sort keys used to order the query
    • getPageQuery

      String getPageQuery(org.springframework.data.domain.Pageable pageable)
      Generate the query that will provide the jump to item query.
      Parameters:
      pageable - the coordinates to pull the next page from the datasource
      Returns:
      the generated query