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

public Interface SqlRowSetMetaData

Known Direct Implementers
org.springframework.jdbc.support.rowset.ResultSetWrappingSqlRowSetMetaData
Imports
org.springframework.jdbc.InvalidResultSetAccessException

Metadata interface for Spring's SqlRowSet, analogous to JDBC's java.sql.ResultSetMetaData.

The main difference to the standard JDBC ResultSetMetaData is that a java.sql.SQLException is never thrown here. This allows SqlRowSetMetaData to be used without having to deal with checked exceptions. SqlRowSetMetaData will throw Spring's InvalidResultSetAccessException instead (when appropriate).

Authors
Thomas Risberg, Juergen Hoeller
Since
1.2
See Also
SqlRowSet#getMetaData(), java.sql.ResultSetMetaData, org.springframework.jdbc.InvalidResultSetAccessException

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the catalog name
getCatalogName
(int
the index of the column
columnIndex
)

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

public String

Returns:

the class name as a String
getColumnClassName
(int
the index of the column
columnIndex
)

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

public int

Returns:

the number of columns
getColumnCount
()

Retrieve the number of columns in the RowSet.

public int

Returns:

the width of the column
getColumnDisplaySize
(int
the index of the column
columnIndex
)

Retrieve the maximum width of the designated column.

public String

Returns:

the column title
getColumnLabel
(int
the index of the column
columnIndex
)

Retrieve the suggested column title for the column specified.

public String

Returns:

the column name
getColumnName
(int
the index of the column
columnIndex
)

Retrieve the column name for the indicated column.

public String[]

Returns:

the column names
getColumnNames
()

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

public int

Returns:

the SQL type code
getColumnType
(int
the index of the column
columnIndex
)

Retrieve the SQL type code for the indicated column.

public String

Returns:

the type name
getColumnTypeName
(int
the index of the column
columnIndex
)

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

public int

Returns:

the precision
getPrecision
(int
the index of the column
columnIndex
)

Retrieve the precision for the indicated column.

public int

Returns:

the scale
getScale
(int
the index of the column
columnIndex
)

Retrieve the scale of the indicated column.

public String

Returns:

the schema name
getSchemaName
(int
the index of the column
columnIndex
)

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

public String

Returns:

the name of the table
getTableName
(int
the index of the column
columnIndex
)

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

public boolean

Returns:

true if the column is case-sensitive, false otherwise
isCaseSensitive
(int
the index of the column
columnIndex
)

Indicate whether the case of the designated column is significant.

public boolean

Returns:

true if the value is a currency value, false otherwise
isCurrency
(int
the index of the column
columnIndex
)

Indicate whether the designated column contains a currency value.

public boolean

Returns:

true if the column contains a signed number, false otherwise
isSigned
(int
the index of the column
columnIndex
)

Indicate whether the designated column contains a signed number.

Method Detail

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

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

Parameters
columnIndex:int

the index of the column

Returns:String

the catalog name

See Also
java.sql.ResultSetMetaData#getCatalogName(int)
getColumnClassNameback to summary
public String getColumnClassName(int columnIndex) throws InvalidResultSetAccessException

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

Parameters
columnIndex:int

the index of the column

Returns:String

the class name as a String

See Also
java.sql.ResultSetMetaData#getColumnClassName(int)
getColumnCountback to summary
public int getColumnCount() throws InvalidResultSetAccessException

Retrieve the number of columns in the RowSet.

Returns:int

the number of columns

See Also
java.sql.ResultSetMetaData#getColumnCount()
getColumnDisplaySizeback to summary
public int getColumnDisplaySize(int columnIndex) throws InvalidResultSetAccessException

Retrieve the maximum width of the designated column.

Parameters
columnIndex:int

the index of the column

Returns:int

the width of the column

See Also
java.sql.ResultSetMetaData#getColumnDisplaySize(int)
getColumnLabelback to summary
public String getColumnLabel(int columnIndex) throws InvalidResultSetAccessException

Retrieve the suggested column title for the column specified.

Parameters
columnIndex:int

the index of the column

Returns:String

the column title

See Also
java.sql.ResultSetMetaData#getColumnLabel(int)
getColumnNameback to summary
public String getColumnName(int columnIndex) throws InvalidResultSetAccessException

Retrieve the column name for the indicated column.

Parameters
columnIndex:int

the index of the column

Returns:String

the column name

See Also
java.sql.ResultSetMetaData#getColumnName(int)
getColumnNamesback to summary
public String[] getColumnNames() throws InvalidResultSetAccessException

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

Returns:String[]

the column names

getColumnTypeback to summary
public int getColumnType(int columnIndex) throws InvalidResultSetAccessException

Retrieve the SQL type code for the indicated column.

Parameters
columnIndex:int

the index of the column

Returns:int

the SQL type code

See Also
java.sql.ResultSetMetaData#getColumnType(int), java.sql.Types
getColumnTypeNameback to summary
public String getColumnTypeName(int columnIndex) throws InvalidResultSetAccessException

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

Parameters
columnIndex:int

the index of the column

Returns:String

the type name

See Also
java.sql.ResultSetMetaData#getColumnTypeName(int)
getPrecisionback to summary
public int getPrecision(int columnIndex) throws InvalidResultSetAccessException

Retrieve the precision for the indicated column.

Parameters
columnIndex:int

the index of the column

Returns:int

the precision

See Also
java.sql.ResultSetMetaData#getPrecision(int)
getScaleback to summary
public int getScale(int columnIndex) throws InvalidResultSetAccessException

Retrieve the scale of the indicated column.

Parameters
columnIndex:int

the index of the column

Returns:int

the scale

See Also
java.sql.ResultSetMetaData#getScale(int)
getSchemaNameback to summary
public String getSchemaName(int columnIndex) throws InvalidResultSetAccessException

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

Parameters
columnIndex:int

the index of the column

Returns:String

the schema name

See Also
java.sql.ResultSetMetaData#getSchemaName(int)
getTableNameback to summary
public String getTableName(int columnIndex) throws InvalidResultSetAccessException

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

Parameters
columnIndex:int

the index of the column

Returns:String

the name of the table

See Also
java.sql.ResultSetMetaData#getTableName(int)
isCaseSensitiveback to summary
public boolean isCaseSensitive(int columnIndex) throws InvalidResultSetAccessException

Indicate whether the case of the designated column is significant.

Parameters
columnIndex:int

the index of the column

Returns:boolean

true if the column is case-sensitive, false otherwise

See Also
java.sql.ResultSetMetaData#isCaseSensitive(int)
isCurrencyback to summary
public boolean isCurrency(int columnIndex) throws InvalidResultSetAccessException

Indicate whether the designated column contains a currency value.

Parameters
columnIndex:int

the index of the column

Returns:boolean

true if the value is a currency value, false otherwise

See Also
java.sql.ResultSetMetaData#isCurrency(int)
isSignedback to summary
public boolean isSigned(int columnIndex) throws InvalidResultSetAccessException

Indicate whether the designated column contains a signed number.

Parameters
columnIndex:int

the index of the column

Returns:boolean

true if the column contains a signed number, false otherwise

See Also
java.sql.ResultSetMetaData#isSigned(int)