Interface ParameterProcessor

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 ParameterProcessor
Represents a functional interface intended to handle parameter mapping for a PreparedStatement. Implementations of this interface should provide the necessary logic to configure parameter values on a prepared statement before execution.
  • Field Details

  • Method Details

    • execute

      void execute(PreparedStatement statement) throws SQLException
      Executes a parameter setting operation on the provided PreparedStatement. Implementations should define the logic for mapping parameters to the prepared statement.
      Parameters:
      statement - The PreparedStatement on which parameter mapping and execution logic is applied
      Throws:
      SQLException - If a database access error occurs
    • noop

      static ParameterProcessor noop()
      Returns a ParameterProcessor that does nothing when executed.
      Returns:
      A no-op ParameterProcessor
    • of

      static ParameterProcessor of(ParameterProcessor processor)
      Returns the provided processor or a no-op processor if the provided value is null.
      Parameters:
      processor - The processor to use
      Returns:
      The supplied processor or a no-op processor if null
    • andThen

      default ParameterProcessor andThen(ParameterProcessor after)
      Returns a new processor that first executes this processor and then invokes the provided after processor.
      Parameters:
      after - The processor to execute after this processor completes
      Returns:
      A composed processor that performs the chained operations
    • compose

      default ParameterProcessor compose(ParameterProcessor before)
      Returns a new processor that first executes the provided before processor and then invokes this processor.
      Parameters:
      before - The processor to execute before this processor
      Returns:
      A composed processor that performs the chained operations
    • combine

      static ParameterProcessor combine(ParameterProcessor... processors)
      Combines all provided processors into a single processor executed in order.
      Parameters:
      processors - The processors to compose
      Returns:
      A composite processor executing each processor in sequence