Interface Logic<D>

Type Parameters:
D - the type of data access interface passed to the logic execution method
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 Logic<D>
Functional interface representing a unit of business logic executed with a data access interface.

Instances of this interface are passed to DataAcc.run(Logic), LogicRunner.run(Logic), LogicRunner.txn(Logic), LogicRun, or LogicTxn.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    run(D data)
    Executes the business logic using the provided data access instance.
  • Method Details

    • run

      void run(D data) throws com.github.sttk.errs.Err
      Executes the business logic using the provided data access instance.
      Parameters:
      data - the data access instance (typically a DataHub implementing a custom data access interface)
      Throws:
      com.github.sttk.errs.Err - if an error occurs during logic execution