Science, asked by warzadaeffi9995, 1 year ago

What is the use of preparedstatementcallback in spring?

Answers

Answered by vasushravu
0
nterface PreparedStatementCallback

Generic callback interface for code that operates on a PreparedStatement. Allows to execute any number of operations on a single PreparedStatement, for example a single executeUpdate call or repeatedexecuteUpdate calls with varying parameters.

Used internally by JdbcTemplate, but also useful for application code. Note that the passed-in PreparedStatement can have been created by the framework or by a custom PreparedStatementCreator. However, the latter is hardly ever necessary, as most custom callback actions will perform updates in which case a standard PreparedStatement is fine. Custom actions will always set parameter values themselves, so that PreparedStatementCreator capability is not needed either.

Similar questions