类 SimpleJdbcCall

  • 所有已实现的接口:
    SimpleJdbcCallOperations

    public class SimpleJdbcCall
    extends AbstractJdbcCall
    implements SimpleJdbcCallOperations
    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/function 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, DB2, Sybase and PostgreSQL. For any other databases you are required to declare all parameters explicitly. You can of course declare all parameters explicitly even if the database provides the necessary meta-data. In that case your declared parameters will take precedence. You can also turn off any meta-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 JdbcTemplate.

    Many of the configuration methods return the current instance of the SimpleJdbcCall in order to provide the ability to chain multiple ones together in a "fluent" interface style.

    从以下版本开始:
    2.5
    作者:
    Thomas Risberg, Stephane Nicoll
    另请参阅:
    DatabaseMetaData, JdbcTemplate