Package 

Interface ExecutionStep

  • All Implemented Interfaces:

    
    public interface ExecutionStep<T extends Object>
    
                        

    A single execution step in a chain, represented as a pre-computed value or a callback provided by user.

    Result of the ExecutionStep will be then asynchronously processed by Joiner as follows:

    • return as is, if the result is a java.util.concurrent.CompletableFuture, for cases like: map, filter etc

    • run the DB query, if the result is a cz.encircled.joiner.query.JoinerQuery

    • otherwise, do persist an entity (or list of entities) and return its reference

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract T perform(Object arg) Execute a user callback or return pre-computed value
      Object convertResult(List<Object> arg) Convert step result if needed (e.g.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • perform

         abstract T perform(Object arg)

        Execute a user callback or return pre-computed value

      • convertResult

         Object convertResult(List<Object> arg)

        Convert step result if needed (e.g. wrap as Optional in case of nullable steps, or extract a singular value in case of findOne)

        Parameters:
        arg - initial step result, always passed as a List, even in case of functions like findOne