| java.lang.Object org.springframework.jdbc.core.simple.AbstractJdbcCall org.springframework.jdbc.core.simple.SimpleJdbcCall
SimpleJdbcCall | public class SimpleJdbcCall extends AbstractJdbcCall implements SimpleJdbcCallOperations(Code) | | A SimpleJdbcCall is a multi-threaded, reusable object representing a call
to a stored procedure or a stored function. It provides meta data processing
to simplify the code needed to access basic stored procedures/functions.
All you need to provide is the name of the procedure/fumnction and a Map
containing the parameters when you execute the call. The names of the
supplied parameters will be matched up with in and out parameters declared
when the stored procedure was created.
The meta data processing is based on the DatabaseMetaData provided by
the JDBC driver. Since we rely on the JDBC driver this "auto-detection"
can only be used for databases that are known to provide accurate meta data.
These currently include Derby, MySQL, Microsoft SQL Server, Oracle and DB2.
For any other databases you are required to declare all parameters explicitly.
You can of course declare all parameters explictly even if the database provides
the necessary meta data. In that case your declared parameters will take precedence.
You can also turn off any mete data processing if you want to use parameter names
that do not match what is declared during the stored procedure compilation.
The actual insert is being handled using Spring's
org.springframework.jdbc.core.JdbcTemplate .
Many of the configuration methods return the current instance of the SimpleJdbcCall
to provide the ablity to string multiple ones together in a "fluid" interface style.
author: Thomas Risberg since: 2.5 See Also: java.sql.DatabaseMetaData See Also: org.springframework.jdbc.core.JdbcTemplate |
Constructor Summary | |
public | SimpleJdbcCall(DataSource dataSource) Constructor that takes one parameter with the JDBC DataSource to use when creating the
JdbcTemplate. | public | SimpleJdbcCall(JdbcTemplate jdbcTemplate) Alternative Constructor that takes one parameter with the JdbcTemplate to be used. |
executeFunction | public T executeFunction(Class<T> returnType, Map args)(Code) | | |
executeObject | public T executeObject(Class<T> returnType, Map args)(Code) | | |
withoutProcedureColumnMetaDataAccess | public SimpleJdbcCall withoutProcedureColumnMetaDataAccess()(Code) | | |
Fields inherited from org.springframework.jdbc.core.simple.AbstractJdbcCall | final protected Log logger(Code)(Java Doc)
|
|
|