Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.jdbc.support.rowset
Class ResultSetWrappingSqlRowSetMetaData

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

All Implemented Interfaces:
  SqlRowSetMetaData

    public class ResultSetWrappingSqlRowSetMetaData

extends java.lang.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(java.sql.ResultSetMetaData resultSetMetaData)` Create a new ResultSetWrappingSqlRowSetMetaData object for the given ResultSetMetaData instance.

Method Summary
`java.lang.String` | `getCatalogName(int column)` Retrieves the catalog name of the table that served as the source for the specified column.
`java.lang.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.
`java.lang.String` | `getColumnLabel(int column)` Retrieve the suggested column title for the column specified.
`java.lang.String` | `getColumnName(int column)` Retrieve the column name for the indicated column.
`java.lang.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.
`java.lang.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.
`java.lang.String` | `getSchemaName(int column)` Retrieves the schema name of the table that served as the source for the specified column.
`java.lang.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(java.sql.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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 java.lang.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)`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD