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!