Interface AsyncSingleQueryable<T>

    • Method Summary

      Modifier and Type Method Description
      default java.util.concurrent.CompletableFuture<java.util.Optional<T>> firstAsync()
      The asynchronous version of the SingleQueryable.first() method.
      default java.util.concurrent.CompletableFuture<java.lang.Void> firstAsync​(java.util.function.Consumer<? super java.util.Optional<T>> callback)
      The asynchronous version of the SingleQueryable.first() method.
    • Method Detail

      • firstAsync

        default java.util.concurrent.CompletableFuture<java.util.Optional<T>> firstAsync()
        The asynchronous version of the SingleQueryable.first() method.
        Returns:
        The asynchronous operation which will retrieve the data from the database. Custom handling for the CompletableFuture can be done here.
        See Also:
        SingleQueryable.first()
      • firstAsync

        default java.util.concurrent.CompletableFuture<java.lang.Void> firstAsync​(java.util.function.Consumer<? super java.util.Optional<T>> callback)
        The asynchronous version of the SingleQueryable.first() method.
        Parameters:
        callback - The action to be applied to the result once it is fetched from the database.
        Returns:
        The asynchronous operation which will retrieve the data from the database and apply the given action to the result.
        See Also:
        SingleQueryable.first()