org.springframework.data.jdbc.support.oracle
Class SqlReturnStructArray<T>

java.lang.Object
  extended by org.springframework.data.jdbc.support.oracle.SqlReturnStructArray<T>
All Implemented Interfaces:
SqlReturnType

public class SqlReturnStructArray<T>
extends Object
implements SqlReturnType

Implementation of the SqlReturnType interface, for convenient access of ARRAYs of STUCTs returned from stored procedure.

A usage example from a StoredProcedure:

proc.declareParameter(new SqlOutParameter("return", Types.ARRAY, "ACTOR_TYPE_ARRAY",
         new SqlReturnStructArray(actorMapper)));
 

Since:
1.0
See Also:
SqlReturnType, SimpleJdbcCall, StoredProcedure

Field Summary
 
Fields inherited from interface org.springframework.jdbc.core.SqlReturnType
TYPE_UNKNOWN
 
Constructor Summary
SqlReturnStructArray(StructMapper<T> mapper)
          Constructor that takes a parameter with the StructMapper to be used.
 
Method Summary
 Object getTypeValue(CallableStatement cs, int i, int sqlType, String typeName)
          The implementation for this specific type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlReturnStructArray

public SqlReturnStructArray(StructMapper<T> mapper)
Constructor that takes a parameter with the StructMapper to be used.

Parameters:
mapper - the mapper
Method Detail

getTypeValue

public Object getTypeValue(CallableStatement cs,
                           int i,
                           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:
getTypeValue in interface SqlReturnType
Throws:
SQLException