org.springframework.data.jdbc.support.oracle
Class SqlReturnSqlData
java.lang.Object
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
- Author:
- Thomas Risberg
- See Also:
SqlReturnType,
SimpleJdbcCall,
StoredProcedure,
SQLData
|
Constructor Summary |
SqlReturnSqlData(Class<?> targetClass)
Constructor that takes one parameter with the class that the retrieved data should be
mapped into. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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