org.springframework.jdbc.core
Class ResultSetSupportingSqlParameter

java.lang.Object
  extended byorg.springframework.jdbc.core.SqlParameter
      extended byorg.springframework.jdbc.core.ResultSetSupportingSqlParameter
Direct Known Subclasses:
SqlOutParameter, SqlReturnResultSet

public class ResultSetSupportingSqlParameter
extends SqlParameter

Common base class for ResultSet-supporting SqlParameters like SqlOutParameter and SqlReturnResultSet.

Since:
1.0.2
Author:
Juergen Hoeller
See Also:
SqlOutParameter, SqlReturnResultSet

Constructor Summary
ResultSetSupportingSqlParameter(String name, int sqlType)
          Create a new ResultSetSupportingSqlParameter.
ResultSetSupportingSqlParameter(String name, int sqlType, ResultSetExtractor rse)
          Create a new ResultSetSupportingSqlParameter.
ResultSetSupportingSqlParameter(String name, int sqlType, RowCallbackHandler rch)
          Create a new ResultSetSupportingSqlParameter.
ResultSetSupportingSqlParameter(String name, int sqlType, RowMapper rm)
          Create a new ResultSetSupportingSqlParameter.
ResultSetSupportingSqlParameter(String name, int sqlType, RowMapper rm, int rowsExpected)
          Create a new ResultSetSupportingSqlParameter.
ResultSetSupportingSqlParameter(String name, int sqlType, String typeName)
          Create a new ResultSetSupportingSqlParameter.
 
Method Summary
 ResultSetExtractor getResultSetExtractor()
          Return the ResultSetExtractor held by this parameter, if any.
 RowCallbackHandler getRowCallbackHandler()
          Return a new instance of the implementation of a RowCallbackHandler, usable for returned ResultSets.
 boolean isResultSetSupported()
          Does this parameter support a ResultSet, i.e. does it hold a ResultSetExtractor, RowCallbackHandler or RowMapper?
 boolean isRowCallbackHandlerSupported()
          Does this parameter support a RowCallbackHandler, i.e. does it hold a RowCallbackHandler or RowMapper?
 
Methods inherited from class org.springframework.jdbc.core.SqlParameter
getName, getSqlType, getTypeName, sqlTypesToAnonymousParameterList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultSetSupportingSqlParameter

public ResultSetSupportingSqlParameter(String name,
                                       int sqlType)
Create a new ResultSetSupportingSqlParameter.

Parameters:
name - name of the parameter, as used in input and output maps
sqlType - SQL type of the parameter according to java.sql.Types

ResultSetSupportingSqlParameter

public ResultSetSupportingSqlParameter(String name,
                                       int sqlType,
                                       String typeName)
Create a new ResultSetSupportingSqlParameter.

Parameters:
name - name of the parameter, as used in input and output maps
sqlType - SQL type of the parameter according to java.sql.Types
typeName - the type name of the parameter (optional)

ResultSetSupportingSqlParameter

public ResultSetSupportingSqlParameter(String name,
                                       int sqlType,
                                       ResultSetExtractor rse)
Create a new ResultSetSupportingSqlParameter.

Parameters:
name - name of the parameter, as used in input and output maps
sqlType - SQL type of the parameter according to java.sql.Types
rse - ResultSetExtractor to use for parsing the ResultSet

ResultSetSupportingSqlParameter

public ResultSetSupportingSqlParameter(String name,
                                       int sqlType,
                                       RowCallbackHandler rch)
Create a new ResultSetSupportingSqlParameter.

Parameters:
name - name of the parameter, as used in input and output maps
sqlType - SQL type of the parameter according to java.sql.Types
rch - RowCallbackHandler to use for parsing the ResultSet

ResultSetSupportingSqlParameter

public ResultSetSupportingSqlParameter(String name,
                                       int sqlType,
                                       RowMapper rm)
Create a new ResultSetSupportingSqlParameter.

Parameters:
name - name of the parameter, as used in input and output maps
sqlType - SQL type of the parameter according to java.sql.Types
rm - RowMapper to use for parsing the ResultSet

ResultSetSupportingSqlParameter

public ResultSetSupportingSqlParameter(String name,
                                       int sqlType,
                                       RowMapper rm,
                                       int rowsExpected)
Create a new ResultSetSupportingSqlParameter.

Parameters:
name - name of the parameter, as used in input and output maps
sqlType - SQL type of the parameter according to java.sql.Types
rm - RowMapper to use for parsing the ResultSet
rowsExpected - number of expected rows
Method Detail

isResultSetSupported

public boolean isResultSetSupported()
Does this parameter support a ResultSet, i.e. does it hold a ResultSetExtractor, RowCallbackHandler or RowMapper?


isRowCallbackHandlerSupported

public boolean isRowCallbackHandlerSupported()
Does this parameter support a RowCallbackHandler, i.e. does it hold a RowCallbackHandler or RowMapper?


getResultSetExtractor

public ResultSetExtractor getResultSetExtractor()
Return the ResultSetExtractor held by this parameter, if any.


getRowCallbackHandler

public RowCallbackHandler getRowCallbackHandler()
Return a new instance of the implementation of a RowCallbackHandler, usable for returned ResultSets. This implementation invokes a given RowMapper via the RowMapperResultReader adapter, of returns a given RowCallbackHandler directly.

See Also:
RowMapperResultReader


Copyright (C) 2003-2004 The Spring Framework Project.