abstract class StatementCreatorUtils
Utility methods for PreparedStatementSetter/Creator and CallableStatementCreator implementations, providing sophisticated parameter management (including support for LOB values).
Used by PreparedStatementCreatorFactory and CallableStatementCreatorFactory, but also available for direct use in custom setter/creator implementations.
Author
Thomas Risberg
Author
Juergen Hoeller
Since
1.1
See Also
PreparedStatementSetterPreparedStatementCreatorCallableStatementCreatorPreparedStatementCreatorFactoryCallableStatementCreatorFactorySqlParameterSqlTypeValueorg.springframework.jdbc.core.support.SqlLobValue
StatementCreatorUtils()
Utility methods for PreparedStatementSetter/Creator and CallableStatementCreator implementations, providing sophisticated parameter management (including support for LOB values). Used by PreparedStatementCreatorFactory and CallableStatementCreatorFactory, but also available for direct use in custom setter/creator implementations. |
static val IGNORE_GETPARAMETERTYPE_PROPERTY_NAME: String
System property that instructs Spring to ignore The default is "false", trying Consider switching this flag to "true" if you experience misbehavior at runtime, e.g. with a connection pool setting back the PreparedStatement instance in case of an exception thrown from |
open static fun cleanupParameters(vararg paramValues: Any): Unit open static fun cleanupParameters(paramValues: MutableCollection<*>): Unit
Clean up all resources held by parameter values which were passed to an execute method. This is for example important for closing LOB values. |
|
open static fun javaTypeToSqlParameterType(javaType: Class<*>): Int
Derive a default SQL type from the given Java type. |
|
open static fun setParameterValue(ps: PreparedStatement, paramIndex: Int, param: SqlParameter, inValue: Any): Unit open static fun setParameterValue(ps: PreparedStatement, paramIndex: Int, sqlType: Int, inValue: Any): Unit open static fun setParameterValue(ps: PreparedStatement, paramIndex: Int, sqlType: Int, typeName: String, inValue: Any): Unit
Set the value for a parameter. The method used is based on the SQL type of the parameter and we can handle complex types like arrays and LOBs. |