Package org.springframework.jdbc.support.rowset

# Class ResultSetWrappingSqlRowSetMetaData

java.lang.Object
org.springframework.jdbc.support.rowset.ResultSetWrappingSqlRowSetMetaData

All Implemented Interfaces:
  `SqlRowSetMetaData`

public class ResultSetWrappingSqlRowSetMetaData extends Object implements 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:
  - `ResultSetWrappingSqlRowSet.getMetaData()`

## Constructor Summary

Constructors
Constructor
Description
`ResultSetWrappingSqlRowSetMetaData(ResultSetMetaData resultSetMetaData)`
Create a new ResultSetWrappingSqlRowSetMetaData object for the given ResultSetMetaData instance.

## Method Summary

Modifier and Type
Method
Description
`String`
`getCatalogName(int column)`
Retrieve the catalog name of the table that served as the source for the specified column.
`String`
`getColumnClassName(int column)`
Retrieve the fully qualified class that the specified column will be mapped to.
`int`
`getColumnCount()`
Retrieve the number of columns in the RowSet.
`int`
`getColumnDisplaySize(int column)`
Retrieve 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)`
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.
`String`
`getSchemaName(int column)`
Retrieve the schema name of the table that served as the source for the specified column.
`String`
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### 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 Details

### getCatalogName

public String getCatalogName(int column) throws InvalidResultSetAccessException
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 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`
Retrieve 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`
Retrieve 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`
Retrieve 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`
Retrieve 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`
Retrieve 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`
Retrieve 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`
Retrieve 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`
Retrieve 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`
Indicate 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 column is case-sensitive, false otherwise
Throws:
  `InvalidResultSetAccessException`
See Also:
  - `ResultSetMetaData.isCaseSensitive(int)`

### isCurrency

public boolean isCurrency(int column) throws InvalidResultSetAccessException
Description copied from interface: `SqlRowSetMetaData`
Indicate 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`
Indicate 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)`