com.ibm.pdq.runtime.statement
Interface Hook
public interface HookProvides the ability to provide pre-execution and post-execution methods bracketing the execution of any
Data
API or annotated method.
An instance of Hook
is assigned to an instance of Data
at the creation of
the Data
instance. This is done by passing the Hook
instance as an argument to the
getData
method of DataFactory
that is being called to create the
Data
instance.
See Also:
Method Summary
Modifier and Type | Method and Description |
---|---|
|
post(String methodName,Data dataInstance,Object returnValue,SqlStatementType sqlStatementType,Object... parameters)
When an instance of
Hook is assigned, the Hook.post method is called after execution.
|
|
pre(String methodName,Data dataInstance,SqlStatementType sqlStatementType,Object... parameters)
When an instance of
Hook is assigned, the Hook.pre method is called before execution.
|
Method Detail
post
void post(String methodName, Data dataInstance, Object returnValue, SqlStatementType sqlStatementType, Object... parameters)
Parameters:
methodName
- a String
that contains the name of the method after which post
is
called. This is provided in case the implementation of post
has need of it. returnValue
- the value returned by the method after which post
is called. This is provided in
case the implementation of post
has need of it. sqlStatementType
- the SqlStatementType
of the SQL statement to be
executed by the method after which post
is called. This is provided in case the
implementation of post
has need of it. parameters
- the parameters to the method after which post
is called. This is provided in case
the implementation of post
has need of it. pre
void pre(String methodName, Data dataInstance, SqlStatementType sqlStatementType, Object... parameters)
When an instance of Hook
is assigned, the Hook.pre
method is called before execution.
Parameters:
methodName
- a String
that contains the name of the method before which pre
is
called. This is provided in case the implementation of pre
has need of it. sqlStatementType
- the SqlStatementType
of the SQL statement to be
executed by the method before which pre
is called. This is provided in case the
implementation of pre
has need of it. parameters
- the parameters to the method before which pre
is called. This is provided in case
the implementation of pre
has need of it.
Hook
is assigned, theHook.post
method is called after execution.