Interface Database.TransactionRunner<T>

Enclosing class:
Database
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 Database.TransactionRunner<T>
Used to define lambda expressions for transactional processing.
  • Method Summary

    Modifier and Type Method Description
    Response<T> run​(java.sql.Connection connection)
    Run an operation in a Transaction.
  • Method Details

    • run

      Response<T> run​(java.sql.Connection connection) throws java.sql.SQLException
      Run an operation in a Transaction.
      Parameters:
      connection - Connection to database.
      Returns:
      Result of operation.
      Throws:
      java.sql.SQLException - thrown if operation fails.