Class OperationHandlerUtil
- java.lang.Object
-
- uk.gov.gchq.gaffer.store.operation.handler.util.OperationHandlerUtil
-
public final class OperationHandlerUtil extends Object
Utilities for Operation Handlers.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Object
getResultsOrNull(Operation op, Context context, Store store)
Executes and operation on the store and returns the results or null.static void
updateOperationInput(Operation operation, Object input)
Updates the input of an operation if the operation is an OperationChain or an Input.
-
-
-
Method Detail
-
updateOperationInput
public static void updateOperationInput(Operation operation, Object input)
Updates the input of an operation if the operation is an OperationChain or an Input.
If the operation is an operation chain then the input will be set on the first operation if it is an Input operation with a null input.
If the operation is an Input operation then the input will be set if the current input is null.
- Parameters:
operation
- the operation to updateinput
- the new input to set on the operation.
-
getResultsOrNull
public static Object getResultsOrNull(Operation op, Context context, Store store) throws OperationException
Executes and operation on the store and returns the results or null.- Parameters:
op
- the operation to executecontext
- the user contextstore
- the store to execute the operation on- Returns:
- the results or null
- Throws:
OperationException
- if the store fails to execute the operation.
-
-