org.springframework.data.jdbc.support.oracle
Class SqlArrayValue<T>
java.lang.Object
org.springframework.jdbc.core.support.AbstractSqlTypeValue
org.springframework.data.jdbc.support.oracle.SqlArrayValue<T>
- All Implemented Interfaces:
- SqlTypeValue
public class SqlArrayValue<T>
- extends AbstractSqlTypeValue
Implementation of the SqlTypeValue interface, for convenient
creation of provided scalar values as an ARRAY.
A usage example from a StoredProcedure:
proc.declareParameter(new SqlParameter("myarray", Types.ARRAY, "NUMBERS"));
...
Map in = new HashMap();
in.put("myarray", new SqlArrayValue<Number>(objectArray);
Map out = proc.execute(in);
- Since:
- 1.0
- See Also:
SqlTypeValue,
AbstractSqlTypeValue,
SimpleJdbcCall,
StoredProcedure
|
Constructor Summary |
SqlArrayValue(T[] values)
Constructor that takes one parameter with the array of values passed in to the
statement. |
SqlArrayValue(T[] values,
String defaultTypeName)
Constructor that takes two parameters, one parameter with the array of values passed in to the
statement and one that takes the default type name to be used when the context where this class
is used is not aware of the type name to use. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SqlArrayValue
public SqlArrayValue(T[] values)
- Constructor that takes one parameter with the array of values passed in to the
statement.
- Parameters:
values - the array containing the values.
SqlArrayValue
public SqlArrayValue(T[] values,
String defaultTypeName)
- Constructor that takes two parameters, one parameter with the array of values passed in to the
statement and one that takes the default type name to be used when the context where this class
is used is not aware of the type name to use.
- Parameters:
values - the array containing the values.defaultTypeName - the default type name.
createTypeValue
protected Object createTypeValue(Connection conn,
int sqlType,
String typeName)
throws SQLException
- The implementation for this specific type. This method is called internally by the
Spring Framework during the out parameter processing and it's not accessed by application
code directly.
- Specified by:
createTypeValue in class AbstractSqlTypeValue
- Throws:
SQLException- See Also:
AbstractSqlTypeValue