|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.org.ogsadai.activity.sql.statement.ParameterisedSQLStatement | +--uk.org.ogsadai.activity.sql.statement.CallableSQLStatement
Executes callable SQL statements.
Field Summary | |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private static DAILogger |
LOG
Logger object for logging in this class |
private boolean |
mFinishedProcessing
Has expression completed (default false ) |
private boolean |
mFirstCall
Has the first call been made? |
private boolean |
mNewCall
Has a new call been made? |
private java.util.Map |
mOutParams
Output parameters for the callable SQL statement |
private int |
mUpdateCount
Current update count from statement execution |
Fields inherited from class uk.org.ogsadai.activity.sql.statement.ParameterisedSQLStatement |
mStatement |
Constructor Summary | |
CallableSQLStatement()
Constructor |
|
CallableSQLStatement(java.sql.Connection conx,
ParameterList parameters,
java.lang.String expression)
Constructor. |
Method Summary | |
boolean |
execute()
Executes an SQL callable statement. |
boolean |
getMoreResults()
Get more results from the SQL statement. |
java.sql.ResultSet |
getNextResultSet()
Gets the next ResultSet if there is one |
int |
getNextUpdateCount()
Gets the next update count if there is one |
java.util.Map |
getOutParameters()
Gets the output parameters after a new execute |
void |
initialise()
Initialise the SQL statement. |
void |
registerOutParameter(int position,
int type)
Register an output parameter for the callable SQL statement. |
private void |
registerOutParameters()
Registers all out parameters with a JDBC callable statement handler |
Methods inherited from class uk.org.ogsadai.activity.sql.statement.ParameterisedSQLStatement |
close, closeTempFilesAndInputStreams, executeQuery, executeUpdate, getConnection, getExpression, getParameters, prepareParameters, setConnection, setExpression, setParameters |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final java.lang.String COPYRIGHT_NOTICE
private static DAILogger LOG
private boolean mFinishedProcessing
false
)
private int mUpdateCount
private boolean mFirstCall
private java.util.Map mOutParams
private boolean mNewCall
Constructor Detail |
public CallableSQLStatement()
public CallableSQLStatement(java.sql.Connection conx, ParameterList parameters, java.lang.String expression) throws java.sql.SQLException
conx
- JDBC connectionparameters
- A list of parametersexpression
- SQL expression
java.sql.SQLException
- If the statement could not be preparedMethod Detail |
public void initialise() throws java.sql.SQLException
SQLStatement
initialise
in interface SQLStatement
initialise
in class ParameterisedSQLStatement
java.sql.SQLException
- If any problem occurs in the driver.public void registerOutParameter(int position, int type)
position
- Parameter positiontype
- JDBC output parameter type.public boolean execute() throws java.sql.SQLException, MissingParametersException, ParameterAccessException
ResultSet
.
java.sql.SQLException
- If any problem occurs in the driver.
MissingParametersException
- If some of the parameters provided all their values yet
others did not.
ParameterAccessException
- If there is a problem when accessing a parameter value.public boolean getMoreResults() throws java.sql.SQLException, MissingParametersException, ParameterAccessException
getMoreResults
returns
false
and getNextUpdateCount
returns
-1.
true
if the next result is a
ResultSet
, false
otherwise.
java.sql.SQLException
- If any problem occurs in the driver.
MissingParametersException
- If some of the parameters provided all their values yet
others did not.
ParameterAccessException
- If there is a problem when accessing a parameter value.public java.sql.ResultSet getNextResultSet() throws java.sql.SQLException
ResultSet
if there is one
ResultSet
or null
if there
are no more results.
java.sql.SQLException
- If any problem occurs in the driver.public int getNextUpdateCount() throws java.sql.SQLException
java.sql.SQLException
- If any problem occurs in the driver.public java.util.Map getOutParameters() throws java.sql.SQLException
java.sql.SQLException
- If any problem occurs in the driver.private void registerOutParameters() throws java.sql.SQLException
java.sql.SQLException
- If any problem occurs in the driver.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |