Interface PagingJdbcIterable.PagingStatementSupplier

Enclosing class:
PagingJdbcIterable<R>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface PagingJdbcIterable.PagingStatementSupplier
Describes a function that creates a new PreparedStatement that pages results through the given offset and maxSize, ready to be executed.
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(Connection connection, int offset, int maxSize)
    Create a new PreparedStatement using the given connection, paging through the provided offset and maxSize.
  • Method Details

    • apply

      PreparedStatement apply(Connection connection, int offset, int maxSize) throws SQLException
      Create a new PreparedStatement using the given connection, paging through the provided offset and maxSize.
      Parameters:
      connection - The connection that will be used to create the PreparedStatement.
      offset - The offset from where to start the page.
      maxSize - The maximum size of the page, resulting in the maximum page size.
      Returns:
      A paging PreparedStatement ready for execution.
      Throws:
      SQLException - When the statement could not be created.