Top Description Fields Constructors Methods
org.springframework.jdbc.support.rowset

public Class ResultSetWrappingSqlRowSetMetaData

extends Object
implements SqlRowSetMetaData
Class Inheritance
All Implemented Interfaces
org.springframework.jdbc.support.rowset.SqlRowSetMetaData
Imports
java.sql.ResultSetMetaData, .SQLException, org.springframework.jdbc.InvalidResultSetAccessException, org.springframework.lang.Nullable

The default implementation of Spring's SqlRowSetMetaData interface, wrapping a java.sql.ResultSetMetaData instance, catching any SQLExceptions and translating them to a corresponding Spring InvalidResultSetAccessException.

Used by ResultSetWrappingSqlRowSet.

Authors
Thomas Risberg, Juergen Hoeller
Since
1.2
See Also
ResultSetWrappingSqlRowSet#getMetaData()

Field Summary

Modifier and TypeField and Description
private String[]
private final ResultSetMetaData

Constructor Summary

AccessConstructor and Description
public
ResultSetWrappingSqlRowSetMetaData(ResultSetMetaData
a disconnected ResultSetMetaData instance to wrap (usually a javax.sql.RowSetMetaData instance)
resultSetMetaData
)

Create a new ResultSetWrappingSqlRowSetMetaData object for the given ResultSetMetaData instance.

Method Summary

Modifier and TypeMethod and Description
public String
getCatalogName(int
the index of the column
column
)

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getCatalogName.

Retrieve the catalog name of the table that served as the source for the specified column.
public String
getColumnClassName(int
the index of the column
column
)

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getColumnClassName.

Retrieve the fully qualified class that the specified column will be mapped to.
public int
getColumnCount()

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getColumnCount.

Retrieve the number of columns in the RowSet.
public int
getColumnDisplaySize(int
the index of the column
column
)

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getColumnDisplaySize.

Retrieve the maximum width of the designated column.
public String
getColumnLabel(int
the index of the column
column
)

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getColumnLabel.

Retrieve the suggested column title for the column specified.
public String
getColumnName(int
the index of the column
column
)

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getColumnName.

Retrieve the column name for the indicated column.
public String[]
getColumnNames()

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getColumnNames.

Return the column names of the table that the result set represents.
public int
getColumnType(int
the index of the column
column
)

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getColumnType.

Retrieve the SQL type code for the indicated column.
public String
getColumnTypeName(int
the index of the column
column
)

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getColumnTypeName.

Retrieve the DBMS-specific type name for the indicated column.
public int
getPrecision(int
the index of the column
column
)

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getPrecision.

Retrieve the precision for the indicated column.
public int
getScale(int
the index of the column
column
)

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getScale.

Retrieve the scale of the indicated column.
public String
getSchemaName(int
the index of the column
column
)

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getSchemaName.

Retrieve the schema name of the table that served as the source for the specified column.
public String
getTableName(int
the index of the column
column
)

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getTableName.

Retrieve the name of the table that served as the source for the specified column.
public boolean
isCaseSensitive(int
the index of the column
column
)

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.isCaseSensitive.

Indicate whether the case of the designated column is significant.
public boolean
isCurrency(int
the index of the column
column
)

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.isCurrency.

Indicate whether the designated column contains a currency value.
public boolean
isSigned(int
the index of the column
column
)

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.isSigned.

Indicate whether the designated column contains a signed number.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

columnNamesback to summary
private String[] columnNames
Annotations
@Nullable
resultSetMetaDataback to summary
private final ResultSetMetaData resultSetMetaData

Constructor Detail

ResultSetWrappingSqlRowSetMetaDataback to summary
public ResultSetWrappingSqlRowSetMetaData(ResultSetMetaData resultSetMetaData)

Create a new ResultSetWrappingSqlRowSetMetaData object for the given ResultSetMetaData instance.

Parameters
resultSetMetaData:ResultSetMetaData

a disconnected ResultSetMetaData instance to wrap (usually a javax.sql.RowSetMetaData instance)

See Also
java.sql.ResultSet#getMetaData, javax.sql.RowSetMetaData, ResultSetWrappingSqlRowSet#getMetaData

Method Detail

getCatalogNameback to summary
public String getCatalogName(int column) throws InvalidResultSetAccessException

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getCatalogName.

Doc from org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getCatalogName.

Retrieve the catalog name of the table that served as the source for the specified column.

Parameters
column:int

the index of the column

Returns:String

the catalog name

Annotations
@Override
getColumnClassNameback to summary
public String getColumnClassName(int column) throws InvalidResultSetAccessException

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getColumnClassName.

Doc from org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getColumnClassName.

Retrieve the fully qualified class that the specified column will be mapped to.

Parameters
column:int

the index of the column

Returns:String

the class name as a String

Annotations
@Override
getColumnCountback to summary
public int getColumnCount() throws InvalidResultSetAccessException

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getColumnCount.

Doc from org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getColumnCount.

Retrieve the number of columns in the RowSet.

Returns:int

the number of columns

Annotations
@Override
getColumnDisplaySizeback to summary
public int getColumnDisplaySize(int column) throws InvalidResultSetAccessException

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getColumnDisplaySize.

Doc from org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getColumnDisplaySize.

Retrieve the maximum width of the designated column.

Parameters
column:int

the index of the column

Returns:int

the width of the column

Annotations
@Override
getColumnLabelback to summary
public String getColumnLabel(int column) throws InvalidResultSetAccessException

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getColumnLabel.

Doc from org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getColumnLabel.

Retrieve the suggested column title for the column specified.

Parameters
column:int

the index of the column

Returns:String

the column title

Annotations
@Override
getColumnNameback to summary
public String getColumnName(int column) throws InvalidResultSetAccessException

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getColumnName.

Doc from org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getColumnName.

Retrieve the column name for the indicated column.

Parameters
column:int

the index of the column

Returns:String

the column name

Annotations
@Override
getColumnNamesback to summary
public String[] getColumnNames() throws InvalidResultSetAccessException

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getColumnNames.

Doc from org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getColumnNames.

Return the column names of the table that the result set represents.

Returns:String[]

the column names

Annotations
@Override
getColumnTypeback to summary
public int getColumnType(int column) throws InvalidResultSetAccessException

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getColumnType.

Doc from org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getColumnType.

Retrieve the SQL type code for the indicated column.

Parameters
column:int

the index of the column

Returns:int

the SQL type code

Annotations
@Override
getColumnTypeNameback to summary
public String getColumnTypeName(int column) throws InvalidResultSetAccessException

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getColumnTypeName.

Doc from org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getColumnTypeName.

Retrieve the DBMS-specific type name for the indicated column.

Parameters
column:int

the index of the column

Returns:String

the type name

Annotations
@Override
getPrecisionback to summary
public int getPrecision(int column) throws InvalidResultSetAccessException

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getPrecision.

Doc from org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getPrecision.

Retrieve the precision for the indicated column.

Parameters
column:int

the index of the column

Returns:int

the precision

Annotations
@Override
getScaleback to summary
public int getScale(int column) throws InvalidResultSetAccessException

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getScale.

Doc from org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getScale.

Retrieve the scale of the indicated column.

Parameters
column:int

the index of the column

Returns:int

the scale

Annotations
@Override
getSchemaNameback to summary
public String getSchemaName(int column) throws InvalidResultSetAccessException

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getSchemaName.

Doc from org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getSchemaName.

Retrieve the schema name of the table that served as the source for the specified column.

Parameters
column:int

the index of the column

Returns:String

the schema name

Annotations
@Override
getTableNameback to summary
public String getTableName(int column) throws InvalidResultSetAccessException

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getTableName.

Doc from org.springframework.jdbc.support.rowset.SqlRowSetMetaData.getTableName.

Retrieve the name of the table that served as the source for the specified column.

Parameters
column:int

the index of the column

Returns:String

the name of the table

Annotations
@Override
isCaseSensitiveback to summary
public boolean isCaseSensitive(int column) throws InvalidResultSetAccessException

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.isCaseSensitive.

Doc from org.springframework.jdbc.support.rowset.SqlRowSetMetaData.isCaseSensitive.

Indicate whether the case of the designated column is significant.

Parameters
column:int

the index of the column

Returns:boolean

true if the column is case-sensitive, false otherwise

Annotations
@Override
isCurrencyback to summary
public boolean isCurrency(int column) throws InvalidResultSetAccessException

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.isCurrency.

Doc from org.springframework.jdbc.support.rowset.SqlRowSetMetaData.isCurrency.

Indicate whether the designated column contains a currency value.

Parameters
column:int

the index of the column

Returns:boolean

true if the value is a currency value, false otherwise

Annotations
@Override
isSignedback to summary
public boolean isSigned(int column) throws InvalidResultSetAccessException

Implements org.springframework.jdbc.support.rowset.SqlRowSetMetaData.isSigned.

Doc from org.springframework.jdbc.support.rowset.SqlRowSetMetaData.isSigned.

Indicate whether the designated column contains a signed number.

Parameters
column:int

the index of the column

Returns:boolean

true if the column contains a signed number, false otherwise

Annotations
@Override