站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 1.2.9 API 文档英文版

ResultSetWrappingSqlRowSetMetaData (Spring Framework) - Spring Framework 1.2.9 API 文档英文版


org.springframework.jdbc.support.rowset
Class ResultSetWrappingSqlRowSetMetaData

java.lang.Object
  extended by org.springframework.jdbc.support.rowset.ResultSetWrappingSqlRowSetMetaData
All Implemented Interfaces:
SqlRowSetMetaData

public class ResultSetWrappingSqlRowSetMetaData
extends Object
implements SqlRowSetMetaData

Default implementation of Spring's SqlRowSetMetaData interface. Used by ResultSetWrappingSqlRowSet.

This implementation wraps a javax.sql.ResultSetMetaData instance, catching any SQLExceptions and translating them to the appropriate Spring DataAccessException.

Since:
1.2
Author:
Thomas Risberg, Juergen Hoeller
See Also:
ResultSetWrappingSqlRowSet.getMetaData()

Constructor Summary
ResultSetWrappingSqlRowSetMetaData(ResultSetMetaData resultSetMetaData)
          Create a new ResultSetWrappingSqlRowSetMetaData object for the given ResultSetMetaData instance.
 
Method Summary
 String getCatalogName(int column)
          Retrieves the catalog name of the table that served as the source for the specified column.
 String getColumnClassName(int column)
          Retrieves the fully qualified class that the specified column will be mapped to.
 int getColumnCount()
          Retrives the number of columns in the RowSet.
 int getColumnDisplaySize(int column)
          Retrieves the maximum width of the designated column.
 String getColumnLabel(int column)
          Retrieve the suggested column title for the column specified.
 String getColumnName(int column)
          Retrieve the column name for the indicated column.
 String[] getColumnNames()
          Return the column names of the table that the result set represents.
 int getColumnType(int column)
          Retrieve the SQL type code for the indicated column.
 String getColumnTypeName(int column)
          Retrieves the DBMS-specific type name for the indicated column.
 int getPrecision(int column)
          Retrieves the precision for the indicated column.
 int getScale(int column)
          Retrieves the scale of the indicated column.
 String getSchemaName(int column)
          Retrieves the schema name of the table that served as the source for the specified column.
 String getTableName(int column)
          Retrieves the name of the table that served as the source for the specified column.
 boolean isCaseSensitive(int column)
          Indicates whether the case of the designated column is significant.
 boolean isCurrency(int column)
          Indicates whether the designated column contains a currency value.
 boolean isSigned(int column)
          Indicates whether the designated column contains a signed number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResultSetWrappingSqlRowSetMetaData

public ResultSetWrappingSqlRowSetMetaData(ResultSetMetaData resultSetMetaData)
Create a new ResultSetWrappingSqlRowSetMetaData object for the given ResultSetMetaData instance.

Parameters:
resultSetMetaData - a disconnected ResultSetMetaData instance to wrap (usually a javax.sql.RowSetMetaData instance)
See Also:
ResultSet.getMetaData(), RowSetMetaData, ResultSetWrappingSqlRowSet.getMetaData()
Method Detail

getCatalogName

public String getCatalogName(int column)
                      throws InvalidResultSetAccessException
Description copied from interface: SqlRowSetMetaData
Retrieves the catalog name of the table that served as the source for the specified column.

Specified by:
getCatalogName in interface SqlRowSetMetaData
Parameters:
column - the index of the column
Returns:
the catalog name
Throws:
InvalidResultSetAccessException
See Also:
ResultSetMetaData.getCatalogName(int)

getColumnClassName

public String getColumnClassName(int column)
                          throws InvalidResultSetAccessException
Description copied from interface: SqlRowSetMetaData
Retrieves the fully qualified class that the specified column will be mapped to.

Specified by:
getColumnClassName in interface SqlRowSetMetaData
Parameters:
column - the index of the column
Returns:
the class name as a String
Throws:
InvalidResultSetAccessException
See Also:
ResultSetMetaData.getColumnClassName(int)

getColumnCount

public int getColumnCount()
                   throws InvalidResultSetAccessException
Description copied from interface: SqlRowSetMetaData
Retrives the number of columns in the RowSet.

Specified by:
getColumnCount in interface SqlRowSetMetaData
Returns:
the number of columns
Throws:
InvalidResultSetAccessException
See Also:
ResultSetMetaData.getColumnCount()

getColumnNames

public String[] getColumnNames()
                        throws InvalidResultSetAccessException
Description copied from interface: SqlRowSetMetaData
Return the column names of the table that the result set represents.

Specified by:
getColumnNames in interface SqlRowSetMetaData
Returns:
the column names
Throws:
InvalidResultSetAccessException

getColumnDisplaySize

public int getColumnDisplaySize(int column)
                         throws InvalidResultSetAccessException
Description copied from interface: SqlRowSetMetaData
Retrieves the maximum width of the designated column.

Specified by:
getColumnDisplaySize in interface SqlRowSetMetaData
Parameters:
column - the index of the column
Returns:
the width of the column
Throws:
InvalidResultSetAccessException
See Also:
ResultSetMetaData.getColumnDisplaySize(int)

getColumnLabel

public String getColumnLabel(int column)
                      throws InvalidResultSetAccessException
Description copied from interface: SqlRowSetMetaData
Retrieve the suggested column title for the column specified.

Specified by:
getColumnLabel in interface SqlRowSetMetaData
Parameters:
column - the index of the column
Returns:
the column title
Throws:
InvalidResultSetAccessException
See Also:
ResultSetMetaData.getColumnLabel(int)

getColumnName

public String getColumnName(int column)
                     throws InvalidResultSetAccessException
Description copied from interface: SqlRowSetMetaData
Retrieve the column name for the indicated column.

Specified by:
getColumnName in interface SqlRowSetMetaData
Parameters:
column - the index of the column
Returns:
the column name
Throws:
InvalidResultSetAccessException
See Also:
ResultSetMetaData.getColumnName(int)

getColumnType

public int getColumnType(int column)
                  throws InvalidResultSetAccessException
Description copied from interface: SqlRowSetMetaData
Retrieve the SQL type code for the indicated column.

Specified by:
getColumnType in interface SqlRowSetMetaData
Parameters:
column - the index of the column
Returns:
the SQL type code
Throws:
InvalidResultSetAccessException
See Also:
ResultSetMetaData.getColumnType(int), Types

getColumnTypeName

public String getColumnTypeName(int column)
                         throws InvalidResultSetAccessException
Description copied from interface: SqlRowSetMetaData
Retrieves the DBMS-specific type name for the indicated column.

Specified by:
getColumnTypeName in interface SqlRowSetMetaData
Parameters:
column - the index of the column
Returns:
the type name
Throws:
InvalidResultSetAccessException
See Also:
ResultSetMetaData.getColumnTypeName(int)

getPrecision

public int getPrecision(int column)
                 throws InvalidResultSetAccessException
Description copied from interface: SqlRowSetMetaData
Retrieves the precision for the indicated column.

Specified by:
getPrecision in interface SqlRowSetMetaData
Parameters:
column - the index of the column
Returns:
the precision
Throws:
InvalidResultSetAccessException
See Also:
ResultSetMetaData.getPrecision(int)

getScale

public int getScale(int column)
             throws InvalidResultSetAccessException
Description copied from interface: SqlRowSetMetaData
Retrieves the scale of the indicated column.

Specified by:
getScale in interface SqlRowSetMetaData
Parameters:
column - the index of the column
Returns:
the scale
Throws:
InvalidResultSetAccessException
See Also:
ResultSetMetaData.getScale(int)

getSchemaName

public String getSchemaName(int column)
                     throws InvalidResultSetAccessException
Description copied from interface: SqlRowSetMetaData
Retrieves the schema name of the table that served as the source for the specified column.

Specified by:
getSchemaName in interface SqlRowSetMetaData
Parameters:
column - the index of the column
Returns:
the schema name
Throws:
InvalidResultSetAccessException
See Also:
ResultSetMetaData.getSchemaName(int)

getTableName

public String getTableName(int column)
                    throws InvalidResultSetAccessException
Description copied from interface: SqlRowSetMetaData
Retrieves the name of the table that served as the source for the specified column.

Specified by:
getTableName in interface SqlRowSetMetaData
Parameters:
column - the index of the column
Returns:
the name of the table
Throws:
InvalidResultSetAccessException
See Also:
ResultSetMetaData.getTableName(int)

isCaseSensitive

public boolean isCaseSensitive(int column)
                        throws InvalidResultSetAccessException
Description copied from interface: SqlRowSetMetaData
Indicates whether the case of the designated column is significant.

Specified by:
isCaseSensitive in interface SqlRowSetMetaData
Parameters:
column - the index of the column
Returns:
true if the case sensitive, false otherwise
Throws:
InvalidResultSetAccessException
See Also:
ResultSetMetaData.isCaseSensitive(int)

isCurrency

public boolean isCurrency(int column)
                   throws InvalidResultSetAccessException
Description copied from interface: SqlRowSetMetaData
Indicates whether the designated column contains a currency value.

Specified by:
isCurrency in interface SqlRowSetMetaData
Parameters:
column - the index of the column
Returns:
true if the value is a currency value, false otherwise
Throws:
InvalidResultSetAccessException
See Also:
ResultSetMetaData.isCurrency(int)

isSigned

public boolean isSigned(int column)
                 throws InvalidResultSetAccessException
Description copied from interface: SqlRowSetMetaData
Indicates whether the designated column contains a signed number.

Specified by:
isSigned in interface SqlRowSetMetaData
Parameters:
column - the index of the column
Returns:
true if the column contains a signed number, false otherwise
Throws:
InvalidResultSetAccessException
See Also:
ResultSetMetaData.isSigned(int)


Copyright (c) 2002-2007 The Spring Framework Project.