Class SqlArrayValue
java.lang.Object
org.springframework.jdbc.support.SqlArrayValue
- All Implemented Interfaces:
SqlValue
Common
SqlValue implementation for JDBC Array creation
based on the JDBC 4 Connection.createArrayOf(String, Object[]) method.
Also serves as a template for custom SqlValue implementations
with cleanup demand.
- Since:
- 6.1
- Author:
- Juergen Hoeller, Philippe Marschall
-
Constructor Summary
ConstructorsConstructorDescriptionSqlArrayValue(String typeName, Object... elements) Create a newSqlArrayValuefor the given type name and elements. -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanup()Clean up resources held by this value object.voidsetValue(PreparedStatement ps, int paramIndex) Set the value on the given PreparedStatement.
-
Constructor Details
-
SqlArrayValue
-
-
Method Details
-
setValue
Description copied from interface:SqlValueSet the value on the given PreparedStatement.- Specified by:
setValuein interfaceSqlValue- Parameters:
ps- the PreparedStatement to work onparamIndex- the index of the parameter for which we need to set the value- Throws:
SQLException- if an SQLException is encountered while setting parameter values
-
cleanup
-