Package org.springframework.jdbc.core
Interface CallableStatementCreator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
One of the three central callback interfaces used by the JdbcTemplate class.
This interface creates a CallableStatement given a connection, provided
by the JdbcTemplate class. Implementations are responsible for providing
SQL and any necessary parameters.
Implementations do not need to concern themselves with SQLExceptions that may be thrown from operations they attempt. The JdbcTemplate class will catch and handle SQLExceptions appropriately.
A PreparedStatementCreator should also implement the SqlProvider interface if it is able to provide the SQL it uses for PreparedStatement creation. This allows for better contextual information in case of exceptions.
-
Method Summary
Modifier and TypeMethodDescriptionCreate a callable statement in this connection.
-
Method Details
-
createCallableStatement
Create a callable statement in this connection. Allows implementations to use CallableStatements.- Parameters:
con
- the Connection to use to create statement- Returns:
- a callable statement
- Throws:
SQLException
- there is no need to catch SQLExceptions that may be thrown in the implementation of this method. The JdbcTemplate class will handle them.
-