org.springframework.data.jdbc.support.oracle
Class SqlReturnSqlData

java.lang.Object
  extended by org.springframework.data.jdbc.support.oracle.SqlReturnSqlData
All Implemented Interfaces:
SqlReturnType

public class SqlReturnSqlData
extends Object
implements SqlReturnType

Implementation of the SqlReturnType interface, for convenient access of object data returned from stored procedure. The target class specified in the constructor must implement java.sql.SQLData.

A usage example from a StoredProcedure:

proc.declareParameter(new SqlOutParameter("return", OracleTypes.STRUCT, "ACTOR_TYPE",
         new SqlReturnArray()));
 

Since:
1.0
See Also:
SqlReturnType, SimpleJdbcCall, StoredProcedure, SQLData

Field Summary
 
Fields inherited from interface org.springframework.jdbc.core.SqlReturnType
TYPE_UNKNOWN
 
Constructor Summary
SqlReturnSqlData(Class<?> targetClass)
          Constructor that takes one parameter with the class that the retrieved data should be mapped into.
 
Method Summary
 Object getTypeValue(CallableStatement cs, int paramIndex, 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

SqlReturnSqlData

public SqlReturnSqlData(Class<?> targetClass)
Constructor that takes one parameter with the class that the retrieved data should be mapped into.

Parameters:
targetClass - class that implements java.sql.SQLData
Method Detail

getTypeValue

public Object getTypeValue(CallableStatement cs,
                           int paramIndex,
                           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 appplication code directly.

Specified by:
getTypeValue in interface SqlReturnType
Throws:
SQLException