|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Hook
Provides 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.
Data
, DataFactory
Modifier and Type | Method and Description |
---|---|
void |
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. |
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. |
void post(String methodName, Data dataInstance, Object returnValue, SqlStatementType sqlStatementType, Object... parameters)
Hook
is assigned, the Hook.post
method is called after execution.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.dataInstance
- an instance of Data
on the same Connection
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.void pre(String methodName, Data dataInstance, SqlStatementType sqlStatementType, Object... parameters)
Hook
is assigned, the Hook.pre
method is called before execution.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.dataInstance
- an instance of Data
on the same Connection
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.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |