Package com.jk.data.dataaccess.core
Interface JKCaller
public interface JKCaller
This interface defines a contract for objects that represent database
callable statements.
It provides methods for defining and working with callable statements, including parameter setting, result reading, and statement generation.
- Version:
- 1.0
- Author:
- Dr. Jalal H. Kiswani
-
Method Summary
Modifier and TypeMethodDescriptiongetCall()
This method gets the SQL call statement for the callable statement.default String
This method generates and returns the full SQL call statement for the callable statement, including place-holders for parameters.int
This method gets the count of parameters in the callable statement.<T> T
readResults
(CallableStatement call) This method reads and processes the results from the providedCallableStatement
.void
registerOut
(CallableStatement call) This method registers output parameters with the providedCallableStatement
.void
setParams
(CallableStatement call) This method sets the parameters of the providedCallableStatement
.
-
Method Details
-
getCall
String getCall()This method gets the SQL call statement for the callable statement.- Returns:
- the SQL call statement.
-
registerOut
This method registers output parameters with the providedCallableStatement
.- Parameters:
call
- Specifies the callable statement to which output parameters are registered.- Throws:
SQLException
- if a database access error occurs.
-
readResults
This method reads and processes the results from the providedCallableStatement
.- Type Parameters:
T
- Specifies the type of the result.- Parameters:
call
- Specifies the callable statement from which results are read.- Returns:
- the result processed from the callable statement.
- Throws:
SQLException
- if a database access error occurs.
-
setParams
This method sets the parameters of the providedCallableStatement
.- Parameters:
call
- Specifies the callable statement for which parameters are set.- Throws:
SQLException
- if a database access error occurs.
-
getParamsCount
int getParamsCount()This method gets the count of parameters in the callable statement.- Returns:
- the count of parameters.
-
getFullCallStatement
This method generates and returns the full SQL call statement for the callable statement, including place-holders for parameters.- Returns:
- the full SQL call statement with place-holders.
-