| |
|
| java.lang.Object org.springframework.jdbc.object.RdbmsOperation org.springframework.jdbc.object.SqlCall org.springframework.jdbc.object.StoredProcedure
StoredProcedure | abstract public class StoredProcedure extends SqlCall (Code) | | Superclass for object abstractions of RDBMS stored procedures.
This class is abstract and it is intended that subclasses will provide
a typed method for invocation that delegates to the supplied
StoredProcedure.execute method.
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.
author: Rod Johnson author: Thomas Risberg See Also: StoredProcedure.setSql |
StoredProcedure | protected StoredProcedure()(Code) | | Allow use as a bean.
|
StoredProcedure | protected StoredProcedure(DataSource ds, String name)(Code) | | Create a new object wrapper for a stored procedure.
Parameters: ds - DataSource to use throughout the lifetimeof this object to obtain connections Parameters: name - name of the stored procedure in the database |
StoredProcedure | protected StoredProcedure(JdbcTemplate jdbcTemplate, String name)(Code) | | Create a new object wrapper for a stored procedure.
Parameters: jdbcTemplate - JdbcTemplate which wraps DataSource Parameters: name - name of the stored procedure in the database |
allowsUnusedParameters | protected boolean allowsUnusedParameters()(Code) | | StoredProcedure parameter Maps are by default allowed to contain
additional entries that are not actually used as parameters.
|
declareParameter | public void declareParameter(SqlParameter param) throws InvalidDataAccessApiUsageException(Code) | | Declare a parameter. Overridden method.
Note: Calls to declareParameter must be made in the same order as
they appear in the database's stored procedure parameter list.
Names are purely used to help mapping.
Parameters: param - parameter object |
execute | public Map execute(Map inParams) throws DataAccessException(Code) | | Execute the stored procedure. Subclasses should define a strongly typed
execute method (with a meaningful name) that invokes this method, populating
the input map and extracting typed values from the output map. Subclass
execute methods will often take domain objects as arguments and return values.
Alternatively, they can return void.
Parameters: inParams - map of input parameters, keyed by name as in parameterdeclarations. Output parameters need not (but can be) included in this map.It is legal for map entries to be null , and this will produce thecorrect behavior using a NULL argument to the stored procedure. map of output params, keyed by name as in parameter declarations.Output parameters will appear here, with their values after thestored procedure has been called. |
execute | public Map execute(ParameterMapper inParamMapper) throws DataAccessException(Code) | | Execute the stored procedure. Subclasses should define a strongly typed
execute method (with a meaningful name) that invokes this method, passing in
a ParameterMapper that will populate the input map. This allows mapping database
specific features since the ParameterMapper has access to the Connection object.
The execute method is also responsible for extracting typed values from the output map.
Subclass execute methods will often take domain objects as arguments and return values.
Alternatively, they can return void.
Parameters: inParamMapper - map of input parameters, keyed by name as in parameterdeclarations. 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 correctbehavior using a NULL argument to the stored procedure. map of output params, keyed by name as in parameter declarations.Output parameters will appear here, with their values after thestored procedure has been called. |
Fields inherited from org.springframework.jdbc.object.RdbmsOperation | final protected Log logger(Code)(Java Doc)
|
|
|
|