|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.jdbc.object.RdbmsOperation org.springframework.jdbc.object.SqlCall org.springframework.jdbc.object.StoredProcedure
public abstract class StoredProcedure
Superclass for object abstractions of RDBMS stored procedures. This class is abstract and its execute methods are protected, preventing use other than through a subclass that offers tighter typing.
The inherited sql
property is the name of the stored
procedure in the RDBMS. Note that JDBC 3.0 introduces named parameters,
although the other features provided by this class are still necessary
in JDBC 3.0.
RdbmsOperation.setSql(java.lang.String)
Field Summary |
---|
Fields inherited from class org.springframework.jdbc.object.RdbmsOperation |
---|
logger |
Constructor Summary | |
---|---|
protected |
StoredProcedure()
Allow use as a bean. |
protected |
StoredProcedure(DataSource ds,
String name)
Create a new object wrapper for a stored procedure. |
protected |
StoredProcedure(JdbcTemplate jdbcTemplate,
String name)
Create a new object wrapper for a stored procedure. |
Method Summary | |
---|---|
protected boolean |
allowsUnusedParameters()
StoredProcedure parameter Maps are by default allowed to contain additional entries that are not actually used as parameters. |
void |
declareParameter(SqlParameter param)
Declare a parameter. |
Map |
execute(Map inParams)
Execute the stored procedure. |
Map |
execute(ParameterMapper inParamMapper)
Execute the stored procedure. |
Methods inherited from class org.springframework.jdbc.object.SqlCall |
---|
compileInternal, getCallString, isFunction, isSqlReadyForUse, newCallableStatementCreator, newCallableStatementCreator, onCompileInternal, setFunction, setSqlReadyForUse |
Methods inherited from class org.springframework.jdbc.object.RdbmsOperation |
---|
afterPropertiesSet, checkCompiled, compile, getDeclaredParameters, getGeneratedKeysColumnNames, getJdbcTemplate, getResultSetType, getSql, isCompiled, isReturnGeneratedKeys, isUpdatableResults, setDataSource, setFetchSize, setGeneratedKeysColumnNames, setJdbcTemplate, setMaxRows, setResultSetType, setReturnGeneratedKeys, setSql, setTypes, setUpdatableResults, supportsLobParameters, validateParameters |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected StoredProcedure()
protected StoredProcedure(DataSource ds, String name)
ds
- DataSource to use throughout the lifetime
of this object to obtain connectionsname
- name of the stored procedure in the databaseprotected StoredProcedure(JdbcTemplate jdbcTemplate, String name)
jdbcTemplate
- JdbcTemplate which wraps DataSourcename
- name of the stored procedure in the databaseMethod Detail |
---|
protected boolean allowsUnusedParameters()
allowsUnusedParameters
in class RdbmsOperation
StoredProcedure
public void declareParameter(SqlParameter param) throws InvalidDataAccessApiUsageException
declareParameter
in class RdbmsOperation
param
- parameter object
InvalidDataAccessApiUsageException
- if the operation is already compiled,
and hence cannot be configured furtherpublic Map execute(Map inParams) throws DataAccessException
inParams
- map of input parameters, keyed by name as in parameter
declarations. Output parameters need not (but can be) included in this map.
It is legal for map entries to be null
, and this will produce the
correct behavior using a NULL argument to the stored procedure.
DataAccessException
public Map execute(ParameterMapper inParamMapper) throws DataAccessException
inParamMapper
- map of input parameters, keyed by name as in parameter
declarations. Output parameters need not (but can be) included in this map.
It is legal for map entries to be null
, and this will produce the correct
behavior using a NULL argument to the stored procedure.
DataAccessException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |