public class SqlStructArrayValue<T> extends AbstractSqlTypeValue
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);
SqlTypeValue
,
AbstractSqlTypeValue
,
SimpleJdbcCall
,
StoredProcedure
TYPE_UNKNOWN
Constructor and Description |
---|
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. |
Modifier and Type | Method and Description |
---|---|
protected Object |
createTypeValue(Connection conn,
int sqlType,
String typeName)
The implementation for this specific type.
|
setTypeValue
public SqlStructArrayValue(T[] values, StructMapper<T> mapper, String structTypeName)
StructMapper
to be used plus the type
name of the STRUCT that the array will contain.values
- the array containing the valuesmapper
- the mapper to create the STRUCT valuesstructTypeName
- the type name of the STRUCT.public SqlStructArrayValue(T[] values, StructMapper<T> mapper, String structTypeName, String arrayTypeName)
StructMapper
to be used plus the type
name of the STRUCT that the array will contain.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.protected Object createTypeValue(Connection conn, int sqlType, String typeName) throws SQLException
createTypeValue
in class AbstractSqlTypeValue
SQLException
AbstractSqlTypeValue