Interface Logic<D>

Type Parameters:
D - The type of the data access object through which data operations are performed.
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>
Represents the application's business logic, designed to separate data access concerns from the core logic.

Implementations of this functional interface should focus solely on the business logic, utilizing the provided data object of type D for all data access operations. The run(Object) method should not contain any direct data access code; instead, it should delegate such operations to methods of the D object.

If an exceptional condition occurs during the execution of the logic, an Exc object should be thrown.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    run(D data)
    Executes the application's business logic.
  • Method Details

    • run

      void run(D data) throws com.github.sttk.errs.Exc
      Executes the application's business logic. This method should implement the core logic, relying on the data object for all data access needs.
      Parameters:
      data - The data access object, providing methods for interacting with data.
      Throws:
      com.github.sttk.errs.Exc - if an error or exceptional condition occurs during the logic execution.