SqlValue implementation for JDBC Array creation
based on the JDBC 4 java.sql.Connection#createArrayOf method.
Also serves as a template for custom SqlValue implementations
with cleanup demand.
| Modifier and Type | Field and Description |
|---|---|
| private Array | |
| private final Object[] | |
| private final String |
| Access | Constructor and Description |
|---|---|
| public | SqlArrayValue(String
the SQL name of the type the elements of the array map to typeName, Object... the elements to populate the elements)Array object withCreate a new |
| Modifier and Type | Method and Description |
|---|---|
| public void | cleanup()
Implements org. |
| public void | setValue(PreparedStatement
the PreparedStatement to work on ps, int the index of the parameter for which we need to set the value paramIndex)Implements org. |
| array | back to summary |
|---|---|
| private Array array
| |
| elements | back to summary |
|---|---|
| private final Object[] elements | |
| typeName | back to summary |
|---|---|
| private final String typeName | |
| SqlArrayValue | back to summary |
|---|---|
| public SqlArrayValue(String typeName, Object... elements) Create a new
| |
| cleanup | back to summary |
|---|---|
| public void cleanup() Implements org. Doc from org. Clean up resources held by this value object.
| |
| setValue | back to summary |
|---|---|
| public void setValue(PreparedStatement ps, int paramIndex) throws SQLException Implements org. Doc from org. Set the value on the given PreparedStatement.
| |