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
ConstructorDescriptionResultSetWrappingSqlRowSetMetaData
(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.int
Retrieve the number of columns in the RowSet.int
getColumnDisplaySize
(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.int
getColumnType
(int column) Retrieve the SQL type code for the indicated column.getColumnTypeName
(int column) Retrieve the DBMS-specific type name for the indicated column.int
getPrecision
(int column) Retrieve the precision for the indicated column.int
getScale
(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.boolean
isCaseSensitive
(int column) Indicate whether the case of the designated column is significant.boolean
isCurrency
(int column) Indicate whether the designated column contains a currency value.boolean
isSigned
(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.RowSetMetaData
instance)- See Also:
-
-
Method Details
-
getCatalogName
Description copied from interface:SqlRowSetMetaData
Retrieve the catalog name of the table that served as the source for the specified column.- Specified by:
getCatalogName
in interfaceSqlRowSetMetaData
- Parameters:
column
- the index of the column- Returns:
- the catalog name
- Throws:
InvalidResultSetAccessException
- See Also:
-
getColumnClassName
Description copied from interface:SqlRowSetMetaData
Retrieve the fully qualified class that the specified column will be mapped to.- Specified by:
getColumnClassName
in interfaceSqlRowSetMetaData
- Parameters:
column
- the index of the column- Returns:
- the class name as a String
- Throws:
InvalidResultSetAccessException
- See Also:
-
getColumnCount
Description copied from interface:SqlRowSetMetaData
Retrieve the number of columns in the RowSet.- Specified by:
getColumnCount
in interfaceSqlRowSetMetaData
- Returns:
- the number of columns
- Throws:
InvalidResultSetAccessException
- See Also:
-
getColumnNames
Description copied from interface:SqlRowSetMetaData
Return the column names of the table that the result set represents.- Specified by:
getColumnNames
in interfaceSqlRowSetMetaData
- Returns:
- the column names
- Throws:
InvalidResultSetAccessException
-
getColumnDisplaySize
Description copied from interface:SqlRowSetMetaData
Retrieve the maximum width of the designated column.- Specified by:
getColumnDisplaySize
in interfaceSqlRowSetMetaData
- Parameters:
column
- the index of the column- Returns:
- the width of the column
- Throws:
InvalidResultSetAccessException
- See Also:
-
getColumnLabel
Description copied from interface:SqlRowSetMetaData
Retrieve the suggested column title for the column specified.- Specified by:
getColumnLabel
in interfaceSqlRowSetMetaData
- Parameters:
column
- the index of the column- Returns:
- the column title
- Throws:
InvalidResultSetAccessException
- See Also:
-
getColumnName
Description copied from interface:SqlRowSetMetaData
Retrieve the column name for the indicated column.- Specified by:
getColumnName
in interfaceSqlRowSetMetaData
- Parameters:
column
- the index of the column- Returns:
- the column name
- Throws:
InvalidResultSetAccessException
- See Also:
-
getColumnType
Description copied from interface:SqlRowSetMetaData
Retrieve the SQL type code for the indicated column.- Specified by:
getColumnType
in interfaceSqlRowSetMetaData
- Parameters:
column
- the index of the column- Returns:
- the SQL type code
- Throws:
InvalidResultSetAccessException
- See Also:
-
getColumnTypeName
Description copied from interface:SqlRowSetMetaData
Retrieve the DBMS-specific type name for the indicated column.- Specified by:
getColumnTypeName
in interfaceSqlRowSetMetaData
- Parameters:
column
- the index of the column- Returns:
- the type name
- Throws:
InvalidResultSetAccessException
- See Also:
-
getPrecision
Description copied from interface:SqlRowSetMetaData
Retrieve the precision for the indicated column.- Specified by:
getPrecision
in interfaceSqlRowSetMetaData
- Parameters:
column
- the index of the column- Returns:
- the precision
- Throws:
InvalidResultSetAccessException
- See Also:
-
getScale
Description copied from interface:SqlRowSetMetaData
Retrieve the scale of the indicated column.- Specified by:
getScale
in interfaceSqlRowSetMetaData
- Parameters:
column
- the index of the column- Returns:
- the scale
- Throws:
InvalidResultSetAccessException
- See Also:
-
getSchemaName
Description copied from interface:SqlRowSetMetaData
Retrieve the schema name of the table that served as the source for the specified column.- Specified by:
getSchemaName
in interfaceSqlRowSetMetaData
- Parameters:
column
- the index of the column- Returns:
- the schema name
- Throws:
InvalidResultSetAccessException
- See Also:
-
getTableName
Description copied from interface:SqlRowSetMetaData
Retrieve the name of the table that served as the source for the specified column.- Specified by:
getTableName
in interfaceSqlRowSetMetaData
- Parameters:
column
- the index of the column- Returns:
- the name of the table
- Throws:
InvalidResultSetAccessException
- See Also:
-
isCaseSensitive
Description copied from interface:SqlRowSetMetaData
Indicate whether the case of the designated column is significant.- Specified by:
isCaseSensitive
in interfaceSqlRowSetMetaData
- Parameters:
column
- the index of the column- Returns:
- true if the case sensitive, false otherwise
- Throws:
InvalidResultSetAccessException
- See Also:
-
isCurrency
Description copied from interface:SqlRowSetMetaData
Indicate whether the designated column contains a currency value.- Specified by:
isCurrency
in 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:SqlRowSetMetaData
Indicate whether the designated column contains a signed number.- Specified by:
isSigned
in interfaceSqlRowSetMetaData
- Parameters:
column
- the index of the column- Returns:
- true if the column contains a signed number, false otherwise
- Throws:
InvalidResultSetAccessException
- See Also:
-