Interface QueryOperation<T>

Type Parameters:
T - type of object as which a success response is represented

public interface QueryOperation<T>
A sequence of instructions that can be chained together, building a query operation which can be executed with execute().

Specifying a success-handler via the onSuccess(Consumer) method is optional.

Specifying an error-handler via the onError(Consumer) method is also optional, but an error during VQL processing will throw an exception.

  • Method Details

    • onSuccess

      QueryOperation<T> onSuccess(Consumer<T> successHandler)
      Sets the function called when VQL execution completes successfully.
      Parameters:
      successHandler - function to call after successful execution
      Returns:
      this QueryOperation
    • onError

      QueryOperation<T> onError(Consumer<QueryOperationError> errorHandler)
      Sets the function called when VQL execution fails with a QueryOperationErrorType.
      Parameters:
      errorHandler - function to call after failed execution
      Returns:
      this QueryOperation
    • execute

      void execute()
      Executes this query operation.