public interface RowSetMetaData extends ResultSetMetaData
RowSet对象中的列的RowSet 。
此接口是ResultSetMetaData ResultSetMetaData扩展,具有用于设置RowSetMetaData对象中的值的方法。
当RowSetReader对象将数据读入RowSet对象时,它将创建一个RowSetMetaData对象,并使用RowSetMetaData界面中的方法RowSetMetaData初始化。
然后读者将RowSetMetaData对象传递给行集。
当应用程序调用方法RowSet.execute时,此接口中的方法在内部调用; 应用程序员不会直接使用它们。
columnNoNulls, columnNullable, columnNullableUnknown| Modifier and Type | Method and Description |
|---|---|
void |
setAutoIncrement(int columnIndex, boolean property)
设置指定列是否自动编号,默认值为
RowSet对象的列不会自动编号。
|
void |
setCaseSensitive(int columnIndex, boolean property)
设置指定列是否区分大小写。
|
void |
setCatalogName(int columnIndex, String catalogName)
将指定的列的表的目录名称(如果有的话)设置为给定的
String 。
|
void |
setColumnCount(int columnCount)
将
RowSet对象中的列数设置为给定的数字。
|
void |
setColumnDisplaySize(int columnIndex, int size)
将指定的列的正常最大宽度设置为给定的
int 。
|
void |
setColumnLabel(int columnIndex, String label)
设置用于打印输出的建议列标题,并显示给给定的
String如果有)。
|
void |
setColumnName(int columnIndex, String columnName)
将指定列的名称设置为给定的
String 。
|
void |
setColumnType(int columnIndex, int SQLType)
将指定列的SQL类型设置为给定的列。
|
void |
setColumnTypeName(int columnIndex, String typeName)
将指定列的类型名称(如果有的话)设置为给定的
String 。
|
void |
setCurrency(int columnIndex, boolean property)
设置指定列是否为现金值。
|
void |
setNullable(int columnIndex, int property)
设置指定列的值是否可以设置为
NULL 。
|
void |
setPrecision(int columnIndex, int precision)
将指定列的小数位数设置为给定的
int 。
|
void |
setScale(int columnIndex, int scale)
将指定列的小数点右侧的位数设置为给定的
int 。
|
void |
setSchemaName(int columnIndex, String schemaName)
将指定列的表的模式(如果有)的名称设置为给定的
String 。
|
void |
setSearchable(int columnIndex, boolean property)
设置指定的列是否可以在where子句中使用。
|
void |
setSigned(int columnIndex, boolean property)
设置指定的列是否是有符号的数字。
|
void |
setTableName(int columnIndex, String tableName)
将指定列的表名(如果有)设置为给定的
String 。
|
getCatalogName, getColumnClassName, getColumnCount, getColumnDisplaySize, getColumnLabel, getColumnName, getColumnType, getColumnTypeName, getPrecision, getScale, getSchemaName, getTableName, isAutoIncrement, isCaseSensitive, isCurrency, isDefinitelyWritable, isNullable, isReadOnly, isSearchable, isSigned, isWritableisWrapperFor, unwrapvoid setColumnCount(int columnCount)
throws SQLException
RowSet对象中的列数设置为给定的数字。
columnCount -
RowSet对象中的列数
SQLException - 如果发生数据库访问错误
void setAutoIncrement(int columnIndex,
boolean property)
throws SQLException
RowSet对象的列不能自动编号。
columnIndex - 第一列是1,第二列是2,...
property - true如果列自动编号;
false如果不是
SQLException - 如果发生数据库访问错误
void setCaseSensitive(int columnIndex,
boolean property)
throws SQLException
false 。
columnIndex - 第一列是1,第二列是2,...
property - true如果列区分大小写;
false如果不是
SQLException - 如果发生数据库访问错误
void setSearchable(int columnIndex,
boolean property)
throws SQLException
false 。
columnIndex - 第一列是1,第二列是2,...
property - true如果列可以在WHERE子句中使用;
false如果不行
SQLException - 如果发生数据库访问错误
void setCurrency(int columnIndex,
boolean property)
throws SQLException
false 。
columnIndex - 第一列是1,第二列是2,...
property - true如果列是现金值;
false如果不是
SQLException - 如果出现数据库访问错误
void setNullable(int columnIndex,
int property)
throws SQLException
NULL 。
默认值为ResultSetMetaData.columnNullableUnknown
columnIndex - 第一列是1,第二列是2,...
property -一个以下常量:
ResultSetMetaData.columnNoNulls ,
ResultSetMetaData.columnNullable ,或
ResultSetMetaData.columnNullableUnknown
SQLException - 如果发生数据库访问错误
void setSigned(int columnIndex,
boolean property)
throws SQLException
false 。
columnIndex - 第一列是1,第二列是2,...
property - true如果列是有符号的数字;
false如果不是
SQLException - 如果发生数据库访问错误
void setColumnDisplaySize(int columnIndex,
int size)
throws SQLException
int 。
columnIndex - 第一列是1,第二列是2,...
size - 指定列的正常最大字符数
SQLException - 如果发生数据库访问错误
void setColumnLabel(int columnIndex,
String label)
throws SQLException
String 。
columnIndex - 第一列是1,第二列是2,...
label - 列标题
SQLException - 如果发生数据库访问错误
void setColumnName(int columnIndex,
String columnName)
throws SQLException
String 。
columnIndex - 第一列是1,第二列是2,...
columnName - 指定列的名称
SQLException - 如果发生数据库访问错误
void setSchemaName(int columnIndex,
String schemaName)
throws SQLException
String 。
columnIndex - 第一列是1,第二列是2,...
schemaName - 模式名称
SQLException - 如果发生数据库访问错误
void setPrecision(int columnIndex,
int precision)
throws SQLException
int 。
columnIndex - 第一列是1,第二列是2,...
precision - 十进制数的总数
SQLException - 如果发生数据库访问错误
void setScale(int columnIndex,
int scale)
throws SQLException
int 。
columnIndex - 第一列是1,第二列是2,...
scale - 小数点右边的位数
SQLException - 如果发生数据库访问错误
void setTableName(int columnIndex,
String tableName)
throws SQLException
String 。
columnIndex - 第一列是1,第二列是2,...
tableName - 列的表名
SQLException - 如果发生数据库访问错误
void setCatalogName(int columnIndex,
String catalogName)
throws SQLException
String 。
columnIndex - 第一列是1,第二列是2,...
catalogName - 列的目录名称
SQLException - 如果发生数据库访问错误
void setColumnType(int columnIndex,
int SQLType)
throws SQLException
columnIndex - 第一列是1,第二列是2,...
SQLType - 列的SQL类型
SQLException - 如果发生数据库访问错误
Types
void setColumnTypeName(int columnIndex,
String typeName)
throws SQLException
String 。
columnIndex - 第一列是1,第二列是2,...
typeName - 数据源特定类型名称。
SQLException - 如果发生数据库访问错误
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.