Interface ReadEventDataForAggregateStatementBuilder

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 interface ReadEventDataForAggregateStatementBuilder
Contract which defines how to build a PreparedStatement for use on JdbcEventStorageEngine.fetchDomainEvents(String, long, int)
Since:
4.3
Author:
Lucas Campos
  • Method Summary

    Modifier and Type
    Method
    Description
    build(Connection connection, EventSchema schema, String identifier, long firstSequenceNumber, int batchSize)
    Creates a statement to read domain event entries for an aggregate with given identifier starting with the first entry having a sequence number that is equal or larger than the given firstSequenceNumber.
  • Method Details

    • build

      PreparedStatement build(Connection connection, EventSchema schema, String identifier, long firstSequenceNumber, int batchSize) throws SQLException
      Creates a statement to read domain event entries for an aggregate with given identifier starting with the first entry having a sequence number that is equal or larger than the given firstSequenceNumber.
      Parameters:
      connection - The connection to the database.
      schema - The EventSchema to be used
      identifier - The identifier of the aggregate.
      firstSequenceNumber - The expected sequence number of the first returned entry.
      batchSize - The number of items to include in the batch.
      Returns:
      The newly created PreparedStatement.
      Throws:
      SQLException - when an exception occurs while creating the prepared statement.