|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.jdbc.core.StatementCreatorUtils
Utility methods for PreparedStatementCreator and CallableStatementCreator implementations, providing sophisticated parameter management (including support for LOB values).
Used in PreparedStatementCreatorFactory and CallableStatementCreatorFactory.
PreparedStatementCreator
,
CallableStatementCreator
,
PreparedStatementCreatorFactory
,
CallableStatementCreatorFactory
,
SqlParameter
,
SqlTypeValue
,
SqlLobValue
Constructor Summary | |
StatementCreatorUtils()
|
Method Summary | |
static void |
cleanupParameters(java.util.Collection paramValues)
Clean up all resources held by parameter values which were passed to an execute method. |
static void |
cleanupParameters(java.lang.Object[] paramValues)
Clean up all resources held by parameter values which were passed to an execute method. |
static void |
setParameterValue(java.sql.PreparedStatement ps,
int paramIndex,
int sqlType,
java.lang.String typeName,
java.lang.Object inValue)
Set the value for a parameter. |
static void |
setParameterValue(java.sql.PreparedStatement ps,
int paramIndex,
SqlParameter declaredParam,
java.lang.Object inValue)
Set the value for a parameter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public StatementCreatorUtils()
Method Detail |
public static void setParameterValue(java.sql.PreparedStatement ps, int paramIndex, SqlParameter declaredParam, java.lang.Object inValue) throws java.sql.SQLException
ps
- the prepared statement or callable statementparamIndex
- index of the parameter we are settingdeclaredParam
- the parameter as it is declared including typeinValue
- the value to set
java.sql.SQLException
- if thrown by PreparedStatement methodspublic static void setParameterValue(java.sql.PreparedStatement ps, int paramIndex, int sqlType, java.lang.String typeName, java.lang.Object inValue) throws java.sql.SQLException
ps
- the prepared statement or callable statementparamIndex
- index of the parameter we are settingsqlType
- the SQL type of the parametertypeName
- the type name of the parameterinValue
- the value to set
java.sql.SQLException
- if thrown by PreparedStatement methodspublic static void cleanupParameters(java.lang.Object[] paramValues)
paramValues
- parameter values supplied. May be null.DisposableSqlTypeValue.cleanup()
,
SqlLobValue.cleanup()
public static void cleanupParameters(java.util.Collection paramValues)
paramValues
- parameter values supplied. May be null.DisposableSqlTypeValue.cleanup()
,
SqlLobValue.cleanup()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |