Class ResultSetWrappingSqlRowSetMetaData
java.lang.Object
org.springframework.jdbc.support.rowset.ResultSetWrappingSqlRowSetMetaData
- All Implemented Interfaces:
SqlRowSetMetaData
The default implementation of Spring's
SqlRowSetMetaData interface, wrapping a
ResultSetMetaData instance, catching any SQLExceptions
and translating them to a corresponding Spring InvalidResultSetAccessException.
Used by ResultSetWrappingSqlRowSet.
- Since:
- 1.2
- Author:
- Thomas Risberg, Juergen Hoeller
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionResultSetWrappingSqlRowSetMetaData(ResultSetMetaData resultSetMetaData) Create a new ResultSetWrappingSqlRowSetMetaData object for the given ResultSetMetaData instance. -
Method Summary
Modifier and TypeMethodDescriptiongetCatalogName(int column) Retrieve the catalog name of the table that served as the source for the specified column.getColumnClassName(int column) Retrieve the fully qualified class that the specified column will be mapped to.intRetrieve the number of columns in the RowSet.intgetColumnDisplaySize(int column) Retrieve the maximum width of the designated column.getColumnLabel(int column) Retrieve the suggested column title for the column specified.getColumnName(int column) Retrieve the column name for the indicated column.String[]Return the column names of the table that the result set represents.intgetColumnType(int column) Retrieve the SQL type code for the indicated column.getColumnTypeName(int column) Retrieve the DBMS-specific type name for the indicated column.intgetPrecision(int column) Retrieve the precision for the indicated column.intgetScale(int column) Retrieve the scale of the indicated column.getSchemaName(int column) Retrieve the schema name of the table that served as the source for the specified column.getTableName(int column) Retrieve the name of the table that served as the source for the specified column.booleanisCaseSensitive(int column) Indicate whether the case of the designated column is significant.booleanisCurrency(int column) Indicate whether the designated column contains a currency value.booleanisSigned(int column) Indicate whether the designated column contains a signed number.
-
Constructor Details
-
ResultSetWrappingSqlRowSetMetaData
Create a new ResultSetWrappingSqlRowSetMetaData object for the given ResultSetMetaData instance.- Parameters:
resultSetMetaData- a disconnected ResultSetMetaData instance to wrap (usually ajavax.sql.RowSetMetaDatainstance)- See Also:
-
-
Method Details
-
getCatalogName
Description copied from interface:SqlRowSetMetaDataRetrieve the catalog name of the table that served as the source for the specified column.- Specified by:
getCatalogNamein interfaceSqlRowSetMetaData- Parameters:
column- the index of the column- Returns:
- the catalog name
- Throws:
InvalidResultSetAccessException- See Also:
-
getColumnClassName
Description copied from interface:SqlRowSetMetaDataRetrieve the fully qualified class that the specified column will be mapped to.- Specified by:
getColumnClassNamein interfaceSqlRowSetMetaData- Parameters:
column- the index of the column- Returns:
- the class name as a String
- Throws:
InvalidResultSetAccessException- See Also:
-
getColumnCount
Description copied from interface:SqlRowSetMetaDataRetrieve the number of columns in the RowSet.- Specified by:
getColumnCountin interfaceSqlRowSetMetaData- Returns:
- the number of columns
- Throws:
InvalidResultSetAccessException- See Also:
-
getColumnNames
Description copied from interface:SqlRowSetMetaDataReturn the column names of the table that the result set represents.- Specified by:
getColumnNamesin interfaceSqlRowSetMetaData- Returns:
- the column names
- Throws:
InvalidResultSetAccessException
-
getColumnDisplaySize
Description copied from interface:SqlRowSetMetaDataRetrieve the maximum width of the designated column.- Specified by:
getColumnDisplaySizein interfaceSqlRowSetMetaData- Parameters:
column- the index of the column- Returns:
- the width of the column
- Throws:
InvalidResultSetAccessException- See Also:
-
getColumnLabel
Description copied from interface:SqlRowSetMetaDataRetrieve the suggested column title for the column specified.- Specified by:
getColumnLabelin interfaceSqlRowSetMetaData- Parameters:
column- the index of the column- Returns:
- the column title
- Throws:
InvalidResultSetAccessException- See Also:
-
getColumnName
Description copied from interface:SqlRowSetMetaDataRetrieve the column name for the indicated column.- Specified by:
getColumnNamein interfaceSqlRowSetMetaData- Parameters:
column- the index of the column- Returns:
- the column name
- Throws:
InvalidResultSetAccessException- See Also:
-
getColumnType
Description copied from interface:SqlRowSetMetaDataRetrieve the SQL type code for the indicated column.- Specified by:
getColumnTypein interfaceSqlRowSetMetaData- Parameters:
column- the index of the column- Returns:
- the SQL type code
- Throws:
InvalidResultSetAccessException- See Also:
-
getColumnTypeName
Description copied from interface:SqlRowSetMetaDataRetrieve the DBMS-specific type name for the indicated column.- Specified by:
getColumnTypeNamein interfaceSqlRowSetMetaData- Parameters:
column- the index of the column- Returns:
- the type name
- Throws:
InvalidResultSetAccessException- See Also:
-
getPrecision
Description copied from interface:SqlRowSetMetaDataRetrieve the precision for the indicated column.- Specified by:
getPrecisionin interfaceSqlRowSetMetaData- Parameters:
column- the index of the column- Returns:
- the precision
- Throws:
InvalidResultSetAccessException- See Also:
-
getScale
Description copied from interface:SqlRowSetMetaDataRetrieve the scale of the indicated column.- Specified by:
getScalein interfaceSqlRowSetMetaData- Parameters:
column- the index of the column- Returns:
- the scale
- Throws:
InvalidResultSetAccessException- See Also:
-
getSchemaName
Description copied from interface:SqlRowSetMetaDataRetrieve the schema name of the table that served as the source for the specified column.- Specified by:
getSchemaNamein interfaceSqlRowSetMetaData- Parameters:
column- the index of the column- Returns:
- the schema name
- Throws:
InvalidResultSetAccessException- See Also:
-
getTableName
Description copied from interface:SqlRowSetMetaDataRetrieve the name of the table that served as the source for the specified column.- Specified by:
getTableNamein interfaceSqlRowSetMetaData- Parameters:
column- the index of the column- Returns:
- the name of the table
- Throws:
InvalidResultSetAccessException- See Also:
-
isCaseSensitive
Description copied from interface:SqlRowSetMetaDataIndicate whether the case of the designated column is significant.- Specified by:
isCaseSensitivein interfaceSqlRowSetMetaData- Parameters:
column- the index of the column- Returns:
- true if the column is case-sensitive, false otherwise
- Throws:
InvalidResultSetAccessException- See Also:
-
isCurrency
Description copied from interface:SqlRowSetMetaDataIndicate whether the designated column contains a currency value.- Specified by:
isCurrencyin interfaceSqlRowSetMetaData- Parameters:
column- the index of the column- Returns:
- true if the value is a currency value, false otherwise
- Throws:
InvalidResultSetAccessException- See Also:
-
isSigned
Description copied from interface:SqlRowSetMetaDataIndicate whether the designated column contains a signed number.- Specified by:
isSignedin interfaceSqlRowSetMetaData- Parameters:
column- the index of the column- Returns:
- true if the column contains a signed number, false otherwise
- Throws:
InvalidResultSetAccessException- See Also:
-