org.springframework.data.jdbc.support.oracle
Class SqlStructArrayValue<T>
java.lang.Object
org.springframework.jdbc.core.support.AbstractSqlTypeValue
org.springframework.data.jdbc.support.oracle.SqlStructArrayValue<T>
- All Implemented Interfaces:
- SqlTypeValue
public class SqlStructArrayValue<T>
- extends AbstractSqlTypeValue
Implementation of the SqlTypeValue interface, for convenient
creation of provided type values as an ARRAY of STRUCTS.
A usage example from a StoredProcedure:
proc.declareParameter(new SqlParameter("myarray", Types.ARRAY, "ACTOR_TYPE_ARRAY"));
...
Map in = new HashMap();
in.put("myarray", new SqlStructArrayValue<Number>(objectArray, actorMapper);
Map out = proc.execute(in);
- Since:
- 1.0
- Author:
- Thomas Risberg
- See Also:
SqlTypeValue,
AbstractSqlTypeValue,
SimpleJdbcCall,
StoredProcedure
|
Constructor Summary |
SqlStructArrayValue(T[] values,
StructMapper<T> mapper,
String structTypeName)
Constructor that takes a parameter with the array of values passed in to the
statement, a parameter with the StructMapper to be used plus the type
name of the STRUCT that the array will contain. |
SqlStructArrayValue(T[] values,
StructMapper<T> mapper,
String structTypeName,
String arrayTypeName)
Constructor that takes a parameter with the array of values passed in to the
statement, a parameter with the StructMapper to be used plus the type
name of the STRUCT that the array will contain. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SqlStructArrayValue
public SqlStructArrayValue(T[] values,
StructMapper<T> mapper,
String structTypeName)
- Constructor that takes a parameter with the array of values passed in to the
statement, a parameter with the
StructMapper to be used plus the type
name of the STRUCT that the array will contain.
- Parameters:
values - the array containing the valuesmapper - the mapper to create the STRUCT valuesstructTypeName - the type name of the STRUCT.
SqlStructArrayValue
public SqlStructArrayValue(T[] values,
StructMapper<T> mapper,
String structTypeName,
String arrayTypeName)
- Constructor that takes a parameter with the array of values passed in to the
statement, a parameter with the
StructMapper to be used plus the type
name of the STRUCT that the array will contain.
- Parameters:
values - the array containing the valuesmapper - the mapper to create the STRUCT valuesstructTypeName - the type name of the STRUCT.arrayTypeName - the type name of the ARRAY when this class is used in a context where the
name of the array type is not known.
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