CallableStatementCreator
objects with different parameters based on an SQL statement and a single
set of parameter declarations.
| Modifier and Type | Class and Description |
|---|---|
| private class | CallableStatementCreatorFactory.CallableStatementCreatorImpl
CallableStatementCreator implementation returned by this class. |
| Modifier and Type | Field and Description |
|---|---|
| private final String | callString
The SQL call string, which won't change when the parameters change. |
| private final List | declaredParameters
List of SqlParameter objects. |
| private int | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | |
| public | CallableStatementCreatorFactory(String
the SQL call string callString, List<SqlParameter> list of declaredParameters)SqlParameter objectsCreate a new factory with the given SQL and the given parameters. |
| Modifier and Type | Method and Description |
|---|---|
| public void | addParameter(SqlParameter
the parameter to add to the list of declared parameters param)Add a new declared parameter. |
| public final String | |
| public CallableStatementCreator | newCallableStatementCreator(Map<String, ?>
list of parameters (may be params)null)Return a new CallableStatementCreator instance given these parameters. |
| public CallableStatementCreator | newCallableStatementCreator(ParameterMapper
the ParameterMapper implementation that will return a Map of parameters inParamMapper)Return a new CallableStatementCreator instance given this parameter mapper. |
| public void | setResultSetType(int
the ResultSet type resultSetType)Set whether to use prepared statements that return a specific type of ResultSet. |
| public void | setUpdatableResults(boolean updatableResults)
Set whether to use prepared statements capable of returning updatable ResultSets. |
| callString | back to summary |
|---|---|
| private final String callString The SQL call string, which won't change when the parameters change. | |
| declaredParameters | back to summary |
|---|---|
| private final List<SqlParameter> declaredParameters List of SqlParameter objects. May not be | |
| resultSetType | back to summary |
|---|---|
| private int resultSetType | |
| updatableResults | back to summary |
|---|---|
| private boolean updatableResults | |
| CallableStatementCreatorFactory | back to summary |
|---|---|
| public CallableStatementCreatorFactory(String callString) Create a new factory. Will need to add parameters via the
| |
| CallableStatementCreatorFactory | back to summary |
|---|---|
| public CallableStatementCreatorFactory(String callString, List<SqlParameter> declaredParameters) Create a new factory with the given SQL and the given parameters.
| |
| addParameter | back to summary |
|---|---|
| public void addParameter(SqlParameter param) Add a new declared parameter. Order of parameter addition is significant.
| |
| getCallString | back to summary |
|---|---|
| public final String getCallString() Return the SQL call string.
| |
| newCallableStatementCreator | back to summary |
|---|---|
| public CallableStatementCreator newCallableStatementCreator(Map<String, ?> params) Return a new CallableStatementCreator instance given these parameters. | |
| newCallableStatementCreator | back to summary |
|---|---|
| public CallableStatementCreator newCallableStatementCreator(ParameterMapper inParamMapper) Return a new CallableStatementCreator instance given this parameter mapper.
| |
| setResultSetType | back to summary |
|---|---|
| public void setResultSetType(int resultSetType) Set whether to use prepared statements that return a specific type of ResultSet. specific type of ResultSet.
| |
| setUpdatableResults | back to summary |
|---|---|
| public void setUpdatableResults(boolean updatableResults) Set whether to use prepared statements capable of returning updatable ResultSets. | |
| Modifier and Type | Field and Description |
|---|---|
| private ParameterMapper | |
| private Map |
| Access | Constructor and Description |
|---|---|
| public | CallableStatementCreatorImpl(ParameterMapper
the ParameterMapper implementation for mapping input parameters inParamMapper)Create a new CallableStatementCreatorImpl. |
| public | CallableStatementCreatorImpl(Map<String, ?>
list of SqlParameter objects inParams)Create a new CallableStatementCreatorImpl. |
| Modifier and Type | Method and Description |
|---|---|
| public void | cleanupParameters()
Implements org. |
| public CallableStatement | createCallableStatement(Connection
the Connection to use to create statement con)Implements org. |
| public String | getSql()
Implements org. |
| public String |
| inParameterMapper | back to summary |
|---|---|
| private ParameterMapper inParameterMapper
| |
| inParameters | back to summary |
|---|---|
| private Map<String, ?> inParameters
| |
| CallableStatementCreatorImpl | back to summary |
|---|---|
| public CallableStatementCreatorImpl(ParameterMapper inParamMapper) Create a new CallableStatementCreatorImpl.
| |
| CallableStatementCreatorImpl | back to summary |
|---|---|
| public CallableStatementCreatorImpl(Map<String, ?> inParams) Create a new CallableStatementCreatorImpl. | |
| cleanupParameters | back to summary |
|---|---|
| public void cleanupParameters() Implements org. Doc from org. Close the resources allocated by parameters that the implementing object holds, for example in case of a DisposableSqlTypeValue (like an SqlLobValue).
| |
| createCallableStatement | back to summary |
|---|---|
| public CallableStatement createCallableStatement(Connection con) throws SQLException Implements org. Doc from org. Create a callable statement in this connection. Allows implementations to use CallableStatements.
| |
| getSql | back to summary |
|---|---|
| public String getSql() Implements org. Doc from org. Return the SQL string for this object, i.e. typically the SQL used for creating statements. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |