|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.mockrunner.jdbc.AbstractResultSetHandler com.mockrunner.jdbc.AbstractParameterResultSetHandler com.mockrunner.jdbc.AbstractOutParameterResultSetHandler
public abstract class AbstractOutParameterResultSetHandler
Abstract base class for all statement types
that support out parameters, i.e. CallableStatement
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.mockrunner.jdbc.AbstractParameterResultSetHandler |
---|
AbstractParameterResultSetHandler.ParameterWrapper |
Constructor Summary | |
---|---|
AbstractOutParameterResultSetHandler()
|
Method Summary | |
---|---|
void |
clearOutParameter()
Clears the out parameters. |
java.util.Map |
getGlobalOutParameter()
Returns the global out parameter Map . |
boolean |
getMustRegisterOutParameters()
Get if out parameter must be registered to be returned. |
java.util.Map |
getOutParameter(java.lang.String sql)
Returns the first out parameter Map that matches
the specified SQL string. |
java.util.Map |
getOutParameter(java.lang.String sql,
java.util.Map parameters)
Returns the first out parameter Map that matches
the specified SQL string and the specified parameters. |
void |
prepareGlobalOutParameter(java.util.Map outParameters)
Prepares the global out parameter Map . |
void |
prepareOutParameter(java.lang.String sql,
java.util.Map outParameters)
Prepare an out parameter Map for a specified
SQL string. |
void |
prepareOutParameter(java.lang.String sql,
java.util.Map outParameters,
java.util.List parameters)
Prepare an out parameter Map for a specified SQL string and
the specified parameters. |
void |
prepareOutParameter(java.lang.String sql,
java.util.Map outParameters,
java.util.Map parameters)
Prepare an out parameter Map for a specified SQL string
and the specified parameters. |
void |
prepareOutParameter(java.lang.String sql,
java.util.Map outParameters,
java.lang.Object[] parameters)
Prepare an out parameter Map for a specified SQL string and
the specified parameters. |
void |
setMustRegisterOutParameters(boolean mustOutParameterBeRegistered)
Set if out parameters must be registered to be returned. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractOutParameterResultSetHandler()
Method Detail |
---|
public void setMustRegisterOutParameters(boolean mustOutParameterBeRegistered)
false
, i.e. if there are matching
out parameters prepared, they are returned even if the
registerOutParameter
methods of CallableStatement
have not been called. If set to true
, registerOutParameter
must be called.
mustOutParameterBeRegistered
- must out parameter be registeredpublic boolean getMustRegisterOutParameters()
public java.util.Map getOutParameter(java.lang.String sql)
Map
that matches
the specified SQL string.
Please note that you can modify the match parameters with
AbstractResultSetHandler.setCaseSensitive(boolean)
, AbstractResultSetHandler.setExactMatch(boolean)
and
AbstractResultSetHandler.setUseRegularExpressions(boolean)
.
sql
- the SQL string
Map
public java.util.Map getOutParameter(java.lang.String sql, java.util.Map parameters)
Map
that matches
the specified SQL string and the specified parameters.
Please note that you can modify the match parameters with
AbstractResultSetHandler.setCaseSensitive(boolean)
, AbstractResultSetHandler.setExactMatch(boolean)
and
AbstractResultSetHandler.setUseRegularExpressions(boolean)
and the match parameters for the
specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter(boolean)
.
sql
- the SQL stringparameters
- the parameters
Map
public void clearOutParameter()
public java.util.Map getGlobalOutParameter()
Map
.
Map
public void prepareGlobalOutParameter(java.util.Map outParameters)
Map
.
outParameters
- the global out parameter Map
public void prepareOutParameter(java.lang.String sql, java.util.Map outParameters)
Map
for a specified
SQL string.
Please note that you can modify the match parameters with
AbstractResultSetHandler.setCaseSensitive(boolean)
, AbstractResultSetHandler.setExactMatch(boolean)
and
AbstractResultSetHandler.setUseRegularExpressions(boolean)
.
sql
- the SQL stringoutParameters
- the out parameter Map
public void prepareOutParameter(java.lang.String sql, java.util.Map outParameters, java.lang.Object[] parameters)
Map
for a specified SQL string and
the specified parameters. The specified parameters array
must contain the parameters in the correct order starting with index 0 for
the first parameter. Please keep in mind that parameters in
CallableStatement
objects start with 1 as the first
parameter. So parameters[0]
maps to the
parameter with index 1.
Please note that you can modify the match parameters with
AbstractResultSetHandler.setCaseSensitive(boolean)
, AbstractResultSetHandler.setExactMatch(boolean)
and
AbstractResultSetHandler.setUseRegularExpressions(boolean)
and the match parameters for the
specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter(boolean)
.
sql
- the SQL stringoutParameters
- the corresponding out parameter Map
parameters
- the parameterspublic void prepareOutParameter(java.lang.String sql, java.util.Map outParameters, java.util.List parameters)
Map
for a specified SQL string and
the specified parameters. The specified parameters array
must contain the parameters in the correct order starting with index 0 for
the first parameter. Please keep in mind that parameters in
CallableStatement
objects start with 1 as the first
parameter. So parameters.get(0)
maps to the
parameter with index 1.
Please note that you can modify the match parameters with
AbstractResultSetHandler.setCaseSensitive(boolean)
, AbstractResultSetHandler.setExactMatch(boolean)
and
AbstractResultSetHandler.setUseRegularExpressions(boolean)
and the match parameters for the
specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter(boolean)
.
sql
- the SQL stringoutParameters
- the corresponding out parameter Map
parameters
- the parameterspublic void prepareOutParameter(java.lang.String sql, java.util.Map outParameters, java.util.Map parameters)
Map
for a specified SQL string
and the specified parameters. The specified parameters Map
must contain the parameters by mapping Integer
or
String
objects to the corresponding parameter.
An Integer
object is the index of the parameter.
A String
is the name of the parameter.
Please note that you can modify the match parameters with
AbstractResultSetHandler.setCaseSensitive(boolean)
, AbstractResultSetHandler.setExactMatch(boolean)
and
AbstractResultSetHandler.setUseRegularExpressions(boolean)
and the match parameters for the
specified parameter list with AbstractParameterResultSetHandler.setExactMatchParameter(boolean)
.
sql
- the SQL stringoutParameters
- the corresponding out parameter Map
parameters
- the parameters
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |