Most visited

Recently visited

Added in API level 1

RowSetMetaData

public interface RowSetMetaData
implements ResultSetMetaData

javax.sql.RowSetMetaData


包含有关RowSet对象中列的RowSet对象。 此接口是ResultSetMetaData接口的扩展,其中ResultSetMetaData用于设置RowSetMetaData对象中的值的方法。 当RowSetReader对象将数据读入RowSet对象时,它会创建一个RowSetMetaData对象并使用RowSetMetaData接口中的方法对其进行初始化。 然后阅读器将RowSetMetaData对象传递给行集。

当应用程序调用方法RowSet.execute时,此接口中的方法在内部调用; 应用程序员不会直接使用它们。

摘要(Summary)

Inherited constants

From interface java.sql.ResultSetMetaData

公共方法(Public methods)

abstract void setAutoIncrement(int columnIndex, boolean property)

设置指定列是否自动编号,默认值是 RowSet对象的列不自动编号。

abstract void setCaseSensitive(int columnIndex, boolean property)

设置指定的列是否区分大小写。

abstract void setCatalogName(int columnIndex, String catalogName)

将指定的列表的目录名称(如果有)设置为给定的 String 。

abstract void setColumnCount(int columnCount)

将 RowSet对象中的列数设置为给定数字。

abstract void setColumnDisplaySize(int columnIndex, int size)

将指定列的字符的最大正常宽度设置为给定的 int 。

abstract void setColumnLabel(int columnIndex, String label)

设置建议的列标题以用于打印输出并显示给定的 String (如果有)。

abstract void setColumnName(int columnIndex, String columnName)

将指定列的名称设置为给定的 String 。

abstract void setColumnType(int columnIndex, int SQLType)

将指定列的SQL类型设置为给定的列。

abstract void setColumnTypeName(int columnIndex, String typeName)

将指定列的特定于数据源的类型名称(如果有)设置为给定的 String 。

abstract void setCurrency(int columnIndex, boolean property)

设置指定的列是否为现金价值。

abstract void setNullable(int columnIndex, int property)

设置指定列的值是否可以设置为 NULL 。

abstract void setPrecision(int columnIndex, int precision)

将指定列的小数位数设置为给定的 int 。

abstract void setScale(int columnIndex, int scale)

将指定列的小数点右侧的位数设置为给定的 int 。

abstract void setSchemaName(int columnIndex, String schemaName)

将指定列的表格架构的名称(如果有)设置为给定的 String 。

abstract void setSearchable(int columnIndex, boolean property)

设置是否可以在where子句中使用指定的列。

abstract void setSigned(int columnIndex, boolean property)

设置指定的列是否是有符号的数字。

abstract void setTableName(int columnIndex, String tableName)

将指定列的表名(如果有)设置为给定的 String 。

继承方法(Inherited methods)

From interface java.sql.ResultSetMetaData
From interface java.sql.Wrapper

公共方法(Public methods)

setAutoIncrement

Added in API level 1
void setAutoIncrement (int columnIndex, 
                boolean property)

设置指定列是否自动编号,默认值是 RowSet对象的列不自动编号。

参数(Parameters)
columnIndex int: the first column is 1, the second is 2, ...
property boolean: true if the column is automatically numbered; false if it is not
抛出异常(Throws)
SQLException if a database access error occurs

setCaseSensitive

Added in API level 1
void setCaseSensitive (int columnIndex, 
                boolean property)

设置指定的列是否区分大小写。 默认值是false 。

参数(Parameters)
columnIndex int: the first column is 1, the second is 2, ...
property boolean: true if the column is case sensitive; false if it is not
抛出异常(Throws)
SQLException if a database access error occurs

setCatalogName

Added in API level 1
void setCatalogName (int columnIndex, 
                String catalogName)

将指定列的表格目录名称(如果有)设置为给定的 String 。

参数(Parameters)
columnIndex int: the first column is 1, the second is 2, ...
catalogName String: the column's catalog name
抛出异常(Throws)
SQLException if a database access error occurs

setColumnCount

Added in API level 1
void setColumnCount (int columnCount)

将 RowSet对象中的列数设置为给定数字。

参数(Parameters)
columnCount int: the number of columns in the RowSet object
抛出异常(Throws)
SQLException if a database access error occurs

setColumnDisplaySize

Added in API level 1
void setColumnDisplaySize (int columnIndex, 
                int size)

将指定列的字符的最大正常宽度设置为给定的 int 。

参数(Parameters)
columnIndex int: the first column is 1, the second is 2, ...
size int: the normal maximum number of characters for the designated column
抛出异常(Throws)
SQLException if a database access error occurs

setColumnLabel

Added in API level 1
void setColumnLabel (int columnIndex, 
                String label)

设置建议的列标题以用于打印输出,并显示给定的 String (如果有)。

参数(Parameters)
columnIndex int: the first column is 1, the second is 2, ...
label String: the column title
抛出异常(Throws)
SQLException if a database access error occurs

setColumnName

Added in API level 1
void setColumnName (int columnIndex, 
                String columnName)

将指定列的名称设置为给定的 String 。

参数(Parameters)
columnIndex int: the first column is 1, the second is 2, ...
columnName String: the designated column's name
抛出异常(Throws)
SQLException if a database access error occurs

setColumnType

Added in API level 1
void setColumnType (int columnIndex, 
                int SQLType)

将指定列的SQL类型设置为给定的列。

参数(Parameters)
columnIndex int: the first column is 1, the second is 2, ...
SQLType int: the column's SQL type
抛出异常(Throws)
SQLException if a database access error occurs

也可以看看:

setColumnTypeName

Added in API level 1
void setColumnTypeName (int columnIndex, 
                String typeName)

将指定列的特定于数据源的类型名称(如果有)设置为给定的 String 。

参数(Parameters)
columnIndex int: the first column is 1, the second is 2, ...
typeName String: data source specific type name.
抛出异常(Throws)
SQLException if a database access error occurs

setCurrency

Added in API level 1
void setCurrency (int columnIndex, 
                boolean property)

设置指定的列是否为现金价值。 默认值是false 。

参数(Parameters)
columnIndex int: the first column is 1, the second is 2, ...
property boolean: true if the column is a cash value; false if it is not
抛出异常(Throws)
SQLException if a database access error occurs

setNullable

Added in API level 1
void setNullable (int columnIndex, 
                int property)

设置指定列的值是否可以设置为NULL 。 默认值是ResultSetMetaData.columnNullableUnknown

参数(Parameters)
columnIndex int: the first column is 1, the second is 2, ...
property int: one of the following constants: ResultSetMetaData.columnNoNulls, ResultSetMetaData.columnNullable, or ResultSetMetaData.columnNullableUnknown
抛出异常(Throws)
SQLException if a database access error occurs

setPrecision

Added in API level 1
void setPrecision (int columnIndex, 
                int precision)

将指定列的小数位数设置为给定 int 。

参数(Parameters)
columnIndex int: the first column is 1, the second is 2, ...
precision int: the total number of decimal digits
抛出异常(Throws)
SQLException if a database access error occurs

setScale

Added in API level 1
void setScale (int columnIndex, 
                int scale)

将指定列的小数点右侧的位数设置为给定的 int 。

参数(Parameters)
columnIndex int: the first column is 1, the second is 2, ...
scale int: the number of digits to right of decimal point
抛出异常(Throws)
SQLException if a database access error occurs

setSchemaName

Added in API level 1
void setSchemaName (int columnIndex, 
                String schemaName)

将指定列的表格架构的名称(如果有)设置为给定的 String 。

参数(Parameters)
columnIndex int: the first column is 1, the second is 2, ...
schemaName String: the schema name
抛出异常(Throws)
SQLException if a database access error occurs

setSearchable

Added in API level 1
void setSearchable (int columnIndex, 
                boolean property)

设置是否可以在where子句中使用指定的列。 默认值是false 。

参数(Parameters)
columnIndex int: the first column is 1, the second is 2, ...
property boolean: true if the column can be used in a WHERE clause; false if it cannot
抛出异常(Throws)
SQLException if a database access error occurs

setSigned

Added in API level 1
void setSigned (int columnIndex, 
                boolean property)

设置指定的列是否是有符号的数字。 默认值是false 。

参数(Parameters)
columnIndex int: the first column is 1, the second is 2, ...
property boolean: true if the column is a signed number; false if it is not
抛出异常(Throws)
SQLException if a database access error occurs

setTableName

Added in API level 1
void setTableName (int columnIndex, 
                String tableName)

将指定列的表名(如果有)设置为给定的 String 。

参数(Parameters)
columnIndex int: the first column is 1, the second is 2, ...
tableName String: the column's table name
抛出异常(Throws)
SQLException if a database access error occurs

Hooray!