接口 SqlRowSetMetaData
public interface SqlRowSetMetaData
Metadata interface for Spring'sSqlRowSet, analogous to JDBC'sResultSetMetaData.The main difference to the standard JDBC ResultSetMetaData is that a
SQLExceptionis never thrown here. This allows SqlRowSetMetaData to be used without having to deal with checked exceptions. SqlRowSetMetaData will throw Spring'sInvalidResultSetAccessExceptioninstead (when appropriate).- 从以下版本开始:
- 1.2
- 作者:
- Thomas Risberg, Juergen Hoeller
- 另请参阅:
SqlRowSet.getMetaData(),ResultSetMetaData,InvalidResultSetAccessException
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 StringgetCatalogName(int columnIndex)Retrieve the catalog name of the table that served as the source for the specified column.StringgetColumnClassName(int columnIndex)Retrieve the fully qualified class that the specified column will be mapped to.intgetColumnCount()Retrieve the number of columns in the RowSet.intgetColumnDisplaySize(int columnIndex)Retrieve the maximum width of the designated column.StringgetColumnLabel(int columnIndex)Retrieve the suggested column title for the column specified.StringgetColumnName(int columnIndex)Retrieve the column name for the indicated column.String[]getColumnNames()Return the column names of the table that the result set represents.intgetColumnType(int columnIndex)Retrieve the SQL type code for the indicated column.StringgetColumnTypeName(int columnIndex)Retrieve the DBMS-specific type name for the indicated column.intgetPrecision(int columnIndex)Retrieve the precision for the indicated column.intgetScale(int columnIndex)Retrieve the scale of the indicated column.StringgetSchemaName(int columnIndex)Retrieve the schema name of the table that served as the source for the specified column.StringgetTableName(int columnIndex)Retrieve the name of the table that served as the source for the specified column.booleanisCaseSensitive(int columnIndex)Indicate whether the case of the designated column is significant.booleanisCurrency(int columnIndex)Indicate whether the designated column contains a currency value.booleanisSigned(int columnIndex)Indicate whether the designated column contains a signed number.
方法详细资料
getCatalogName
String getCatalogName(int columnIndex) throws InvalidResultSetAccessException
Retrieve the catalog name of the table that served as the source for the specified column.- 参数:
columnIndex- the index of the column- 返回:
- the catalog name
- 抛出:
InvalidResultSetAccessException- 另请参阅:
ResultSetMetaData.getCatalogName(int)
getColumnClassName
String getColumnClassName(int columnIndex) throws InvalidResultSetAccessException
Retrieve the fully qualified class that the specified column will be mapped to.- 参数:
columnIndex- the index of the column- 返回:
- the class name as a String
- 抛出:
InvalidResultSetAccessException- 另请参阅:
ResultSetMetaData.getColumnClassName(int)
getColumnCount
int getColumnCount() throws InvalidResultSetAccessException
Retrieve the number of columns in the RowSet.- 返回:
- the number of columns
- 抛出:
InvalidResultSetAccessException- 另请参阅:
ResultSetMetaData.getColumnCount()
getColumnNames
String[] getColumnNames() throws InvalidResultSetAccessException
Return the column names of the table that the result set represents.- 返回:
- the column names
- 抛出:
InvalidResultSetAccessException
getColumnDisplaySize
int getColumnDisplaySize(int columnIndex) throws InvalidResultSetAccessException
Retrieve the maximum width of the designated column.- 参数:
columnIndex- the index of the column- 返回:
- the width of the column
- 抛出:
InvalidResultSetAccessException- 另请参阅:
ResultSetMetaData.getColumnDisplaySize(int)
getColumnLabel
String getColumnLabel(int columnIndex) throws InvalidResultSetAccessException
Retrieve the suggested column title for the column specified.- 参数:
columnIndex- the index of the column- 返回:
- the column title
- 抛出:
InvalidResultSetAccessException- 另请参阅:
ResultSetMetaData.getColumnLabel(int)
getColumnName
String getColumnName(int columnIndex) throws InvalidResultSetAccessException
Retrieve the column name for the indicated column.- 参数:
columnIndex- the index of the column- 返回:
- the column name
- 抛出:
InvalidResultSetAccessException- 另请参阅:
ResultSetMetaData.getColumnName(int)
getColumnType
int getColumnType(int columnIndex) throws InvalidResultSetAccessException
Retrieve the SQL type code for the indicated column.- 参数:
columnIndex- the index of the column- 返回:
- the SQL type code
- 抛出:
InvalidResultSetAccessException- 另请参阅:
ResultSetMetaData.getColumnType(int),Types
getColumnTypeName
String getColumnTypeName(int columnIndex) throws InvalidResultSetAccessException
Retrieve the DBMS-specific type name for the indicated column.- 参数:
columnIndex- the index of the column- 返回:
- the type name
- 抛出:
InvalidResultSetAccessException- 另请参阅:
ResultSetMetaData.getColumnTypeName(int)
getPrecision
int getPrecision(int columnIndex) throws InvalidResultSetAccessException
Retrieve the precision for the indicated column.- 参数:
columnIndex- the index of the column- 返回:
- the precision
- 抛出:
InvalidResultSetAccessException- 另请参阅:
ResultSetMetaData.getPrecision(int)
getScale
int getScale(int columnIndex) throws InvalidResultSetAccessException
Retrieve the scale of the indicated column.- 参数:
columnIndex- the index of the column- 返回:
- the scale
- 抛出:
InvalidResultSetAccessException- 另请参阅:
ResultSetMetaData.getScale(int)
getSchemaName
String getSchemaName(int columnIndex) throws InvalidResultSetAccessException
Retrieve the schema name of the table that served as the source for the specified column.- 参数:
columnIndex- the index of the column- 返回:
- the schema name
- 抛出:
InvalidResultSetAccessException- 另请参阅:
ResultSetMetaData.getSchemaName(int)
getTableName
String getTableName(int columnIndex) throws InvalidResultSetAccessException
Retrieve the name of the table that served as the source for the specified column.- 参数:
columnIndex- the index of the column- 返回:
- the name of the table
- 抛出:
InvalidResultSetAccessException- 另请参阅:
ResultSetMetaData.getTableName(int)
isCaseSensitive
boolean isCaseSensitive(int columnIndex) throws InvalidResultSetAccessException
Indicate whether the case of the designated column is significant.- 参数:
columnIndex- the index of the column- 返回:
- true if the case sensitive, false otherwise
- 抛出:
InvalidResultSetAccessException- 另请参阅:
ResultSetMetaData.isCaseSensitive(int)
isCurrency
boolean isCurrency(int columnIndex) throws InvalidResultSetAccessException
Indicate whether the designated column contains a currency value.- 参数:
columnIndex- the index of the column- 返回:
- true if the value is a currency value, false otherwise
- 抛出:
InvalidResultSetAccessException- 另请参阅:
ResultSetMetaData.isCurrency(int)
isSigned
boolean isSigned(int columnIndex) throws InvalidResultSetAccessException
Indicate whether the designated column contains a signed number.- 参数:
columnIndex- the index of the column- 返回:
- true if the column contains a signed number, false otherwise
- 抛出:
InvalidResultSetAccessException- 另请参阅:
ResultSetMetaData.isSigned(int)