Package com.veeva.vault.sdk.api.query
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 Summary
Modifier and TypeMethodDescriptionvoid
execute()
Executes this query operation.onError
(Consumer<QueryOperationError> errorHandler) Sets the function called when VQL execution fails with aQueryOperationErrorType
.Sets the function called when VQL execution completes successfully.
-
Method Details
-
onSuccess
Sets the function called when VQL execution completes successfully.- Parameters:
successHandler
- function to call after successful execution- Returns:
- this QueryOperation
-
onError
Sets the function called when VQL execution fails with aQueryOperationErrorType
.- Parameters:
errorHandler
- function to call after failed execution- Returns:
- this QueryOperation
-
execute
void execute()Executes this query operation.
-