public class RowSetMetaDataImpl extends Object implements RowSetMetaData, Serializable
RowSet
对象的列的元数据信息的实现方法。一个
RowSetMetaDataImpl
对象跟踪在该行的列数和维护每一列列的属性一个内部数组。
一个RowSet
对象创建一个RowSetMetaDataImpl
对象内部为了设置和检索的列的信息。
注:在RowSetMetaDataImpl
对象的所有元数据应被视为不可用直到RowSet
对象,它描述的是稠密的。因此,任何RowSetMetaDataImpl
方法检索信息被定义为未指定的行为时,它被称为前RowSet
对象包含的数据。
columnNoNulls, columnNullable, columnNullableUnknown
Constructor and Description |
---|
RowSetMetaDataImpl() |
Modifier and Type | Method and Description |
---|---|
String |
getCatalogName(int columnIndex)
检索指定列中的值在指定列中的目录名称。
|
String |
getColumnClassName(int columnIndex)
检索类的完全限定名的java编程语言,在指定的列的值将映射。
|
int |
getColumnCount()
检索的列数在
RowSet 对象,这个对象被创建
RowSetMetaDataImpl 。
|
int |
getColumnDisplaySize(int columnIndex)
检索在指定列的字符正常最大宽度。
|
String |
getColumnLabel(int columnIndex)
检索建议栏目标题用于打印和显示指定列。
|
String |
getColumnName(int columnIndex)
检索指定列的名称。
|
int |
getColumnType(int columnIndex)
检索类型代码(其中的一个
java.sql.Types 常数)存储在指定的列的值的SQL类型。
|
String |
getColumnTypeName(int columnIndex)
检索存储在指定列中的值的数据库管理系统特定类型名称。
|
int |
getPrecision(int columnIndex)
检索存储在指定列中的值的总数。
|
int |
getScale(int columnIndex)
检索在指定列中存储的值的小数点的右边的数字数。
|
String |
getSchemaName(int columnIndex)
检索指定列中的值在指定列中的模式名称。
|
String |
getTableName(int columnIndex)
检索指定列中的值的表的名称。
|
boolean |
isAutoIncrement(int columnIndex)
检索一个值是否存放在指定的列自动编号,因此只读。
|
boolean |
isCaseSensitive(int columnIndex)
指示是否指定列的名称事项的情况。
|
boolean |
isCurrency(int columnIndex)
指示存储在指定列中的值是否为现金值。
|
boolean |
isDefinitelyWritable(int columnIndex)
指示指定列上的写操作是否一定会成功。
|
int |
isNullable(int columnIndex)
检索一个常量指示是否在指定的列存储
NULL 价值。
|
boolean |
isReadOnly(int columnIndex)
指示指定的列是绝对不可写,因此只读。
|
boolean |
isSearchable(int columnIndex)
指示值存储在指定的列可以用于
WHERE 条款。
|
boolean |
isSigned(int columnIndex)
指示存储在指定列中的值是否是符号号。
|
boolean |
isWrapperFor(类<?> interfaces)
如果此实现了接口参数,或者直接或间接为一个对象的一个对象,则返回真。
|
boolean |
isWritable(int columnIndex)
指示是否在指定的列上写操作是否成功,是否成功。
|
void |
setAutoIncrement(int columnIndex, boolean property)
设置指定的列自动编号,因此只读到给定值,
boolean 。
|
void |
setCaseSensitive(int columnIndex, boolean property)
设置是否在指定的列的名称是以给定的
boolean 敏感。
|
void |
setCatalogName(int columnIndex, String catalogName)
设置目录名称的表的指定列了catalogname。
|
void |
setColumnCount(int columnCount)
设置为给定数量的列数在
RowSet 对象,这个对象被创建
RowSetMetaDataImpl 。
|
void |
setColumnDisplaySize(int columnIndex, int size)
设置指定列的特定数量的字符的最大数量的正常。
|
void |
setColumnLabel(int columnIndex, String label)
集的建议列标签用于打印和显示,如果有的话,要标签。
|
void |
setColumnName(int columnIndex, String columnName)
将指定的列的列名称设置为给定的名称。
|
void |
setColumnType(int columnIndex, int SQLType)
设置存储在指定的列了从类
java.sql.Types 类型代码值的SQL类型代码。
|
void |
setColumnTypeName(int columnIndex, String typeName)
将存储在指定列中的值的数据源使用的类型名称设置为给定类型名称。
|
void |
setCurrency(int columnIndex, boolean property)
集值是否存放在指定的列是给定的
boolean 现金价值。
|
void |
setNullable(int columnIndex, int property)
集值是否存放在指定的列可以设置为
NULL 于给定接口
ResultSetMetaData 常数。
|
void |
setPrecision(int columnIndex, int precision)
将指定列中存储的值的总数设置为给定数。
|
void |
setScale(int columnIndex, int scale)
将指定列中的一个值的数字的数字设置为给定数的值的数字。
|
void |
setSchemaName(int columnIndex, String schemaName)
设置指定的列的表的架构名称,如果有的话,要SchemaName。
|
void |
setSearchable(int columnIndex, boolean property)
设置是否在指定的列中存储的值可以用在
WHERE 条款给出的
boolean 价值。
|
void |
setSigned(int columnIndex, boolean property)
集值是否存放在指定的列是一个有符号数的
boolean 。
|
void |
setTableName(int columnIndex, String tableName)
将指定的列导出到给定表名称的表的名称。
|
<T> T |
unwrap(类<T> iface)
返回一个实现给定接口的对象,允许访问非标准方法,或不使用代理的标准方法。
|
public void setColumnCount(int columnCount) throws SQLException
RowSet
对象,这个对象被创建
RowSetMetaDataImpl
。
setColumnCount
接口
RowSetMetaData
columnCount
-
int
给在
RowSet
对象的列数
SQLException
-如果给定的数量等于或小于零
public void setAutoIncrement(int columnIndex, boolean property) throws SQLException
boolean
。
setAutoIncrement
接口
RowSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和行集中的列数之间,包容
property
-
true
如果给定的列自动递增;
false
否则
SQLException
-如果一个数据库访问错误发生或给定的索引越界
public void setCaseSensitive(int columnIndex, boolean property) throws SQLException
boolean
敏感。
setCaseSensitive
接口
RowSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和行集中的列数之间,包容
property
-
true
表明栏目名称是区分大小写的;
false
否则
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public void setSearchable(int columnIndex, boolean property) throws SQLException
WHERE
条款给出的
boolean
价值。
setSearchable
接口
RowSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和行集中的列数之间,包容
property
-
true
表示列值可以用在
WHERE
条款;
false
否则
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public void setCurrency(int columnIndex, boolean property) throws SQLException
boolean
现金价值。
setCurrency
接口
RowSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,
1
和列数之间的包容,包容
property
-如果价值是现金价值;否则为false。
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public void setNullable(int columnIndex, int property) throws SQLException
NULL
于给定接口
ResultSetMetaData
常数。
setNullable
接口
RowSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
property
-下面的一个
ResultSetMetaData
常数:
columnNoNulls
,
columnNullable
,或
columnNullableUnknown
SQLException
-如果一个数据库访问错误发生时,给定的列数是出界,或为财产参数提供的值不是一个常数:
ResultSetMetaData.columnNoNulls
以下,
ResultSetMetaData.columnNullable
,或
ResultSetMetaData.columnNullableUnknown
public void setSigned(int columnIndex, boolean property) throws SQLException
boolean
。
setSigned
接口
RowSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
property
-
true
表示列的值是一个有符号数;
false
表明它不是
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public void setColumnDisplaySize(int columnIndex, int size) throws SQLException
setColumnDisplaySize
接口
RowSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
size
-在字符列的最大尺寸;必须
0
或更多
SQLException
-如果一个数据库访问错误发生时,给定的列数是出界,或大小小于
0
public void setColumnLabel(int columnIndex, String label) throws SQLException
null
,列标签设置为空字符串(“”)。
setColumnLabel
接口
RowSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
label
-列标签可用于打印和显示;如果列标签
null
,空
String
设置
SQLException
-如果一个数据库访问错误发生或给定的列的索引越界
public void setColumnName(int columnIndex, String columnName) throws SQLException
setColumnName
接口
RowSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
columnName
-
String
对象显示的列的名称;如果名字是
null
,空
String
设置
SQLException
-如果一个数据库访问错误发生或给定的列的索引越界
public void setSchemaName(int columnIndex, String schemaName) throws SQLException
null
,模式名称设置为空字符串(“”)。
setSchemaName
接口
RowSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
schemaName
为表的指定列值的源架构名称;可能是一个空的
String
或
null
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public void setPrecision(int columnIndex, int precision) throws SQLException
setPrecision
接口
RowSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
precision
-十进制数字的总数必须
0
或更多;
SQLException
-如果一个数据库访问错误发生,columnindex出界,或精度小于
0
public void setScale(int columnIndex, int scale) throws SQLException
setScale
接口
RowSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
scale
-位数的小数点右边的;必须等于或大于零
SQLException
-如果一个数据库访问错误发生,columnindex出界,或规模小于
0
public void setTableName(int columnIndex, String tableName) throws SQLException
setTableName
接口
RowSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
tableName
-列的表的名称;可
null
或空字符串
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public void setCatalogName(int columnIndex, String catalogName) throws SQLException
null
,目录名称设置为空字符串。
setCatalogName
接口
RowSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
catalogName
-列的表的目录名称;如果catalogname是
null
,空
String
设置
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public void setColumnType(int columnIndex, int SQLType) throws SQLException
java.sql.Types
类型代码值的SQL类型代码。
setColumnType
接口
RowSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
SQLType
-指定列的SQL类型,它必须是一个在课堂上
java.sql.Types
常数
SQLException
-如果一个数据库访问错误发生时,给定的列数是出界,或指定的列类型不一的
java.sql.Types
常数
Types
public void setColumnTypeName(int columnIndex, String typeName) throws SQLException
setColumnTypeName
接口
RowSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
typeName
的特定数据源的类型名称;如果是
null
typename,空
String
设置
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public int getColumnCount() throws SQLException
RowSet
对象,这个对象被创建
RowSetMetaDataImpl
。
getColumnCount
接口
ResultSetMetaData
SQLException
-如果出现错误确定列数
public boolean isAutoIncrement(int columnIndex) throws SQLException
isAutoIncrement
接口
ResultSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
true
如果列自动编号;
false
否则
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public boolean isCaseSensitive(int columnIndex) throws SQLException
isCaseSensitive
接口
ResultSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
true
如果列名称是区分大小写的;
false
否则
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public boolean isSearchable(int columnIndex) throws SQLException
WHERE
条款。
isSearchable
接口
ResultSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
true
如果在指定列的值可以用在
WHERE
条款;
false
否则
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public boolean isCurrency(int columnIndex) throws SQLException
isCurrency
接口
ResultSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
true
如果在指定列的值是一个现金价值;
false
否则
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public int isNullable(int columnIndex) throws SQLException
NULL
价值。
isNullable
接口
ResultSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
ResultSetMetaData
接口;要么
columnNoNulls
,
columnNullable
,或
columnNullableUnknown
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public boolean isSigned(int columnIndex) throws SQLException
isSigned
接口
ResultSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
true
如果在指定的列的值是一个有符号数;
false
否则
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public int getColumnDisplaySize(int columnIndex) throws SQLException
getColumnDisplaySize
接口
ResultSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public String getColumnLabel(int columnIndex) throws SQLException
getColumnLabel
接口
ResultSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public String getColumnName(int columnIndex) throws SQLException
getColumnName
接口
ResultSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public String getSchemaName(int columnIndex) throws SQLException
getSchemaName
接口
ResultSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
String
如果没有架构名称是可用的
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public int getPrecision(int columnIndex) throws SQLException
getPrecision
接口
ResultSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public int getScale(int columnIndex) throws SQLException
getScale
接口
ResultSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public String getTableName(int columnIndex) throws SQLException
getTableName
接口
ResultSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
String
如果没有表的名字是可用的
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public String getCatalogName(int columnIndex) throws SQLException
getCatalogName
接口
ResultSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
String
如果没有目录的名字是可用的
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public int getColumnType(int columnIndex) throws SQLException
java.sql.Types
常数)存储在指定的列的值的SQL类型。
getColumnType
接口
ResultSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
int
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
Types
public String getColumnTypeName(int columnIndex) throws SQLException
getColumnTypeName
接口
ResultSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public boolean isReadOnly(int columnIndex) throws SQLException
isReadOnly
接口
ResultSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
true
RowSet
对象是只读的,因此不可更新的;
false
否则
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public boolean isWritable(int columnIndex) throws SQLException
true
意味着写操作可能成功或者不成功的返回值。
isWritable
接口
ResultSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
true
如果写操作在指定的列可能会成功;
false
否则
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public boolean isDefinitelyWritable(int columnIndex) throws SQLException
isDefinitelyWritable
接口
ResultSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
true
如果写操作在指定的列就一定成功;
false
否则
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public String getColumnClassName(int columnIndex) throws SQLException
int
的类的名称,该方法返回的将
java.lang.Integer
。
如果在指定的列的值有一个自定义的映射,实现SQLData
方法返回类的名称。当法ResultSet.getObject
称为从指定列中检索值,它会创建这个类或其子类的一个实例。
getColumnClassName
接口
ResultSetMetaData
columnIndex
-第一列是1,其次是2,等等;必须
1
和列数之间,包容
RowSet.getObject
用于检索指定列中的值。这是当有一个自定义映射时使用的自定义映射的类名称。
SQLException
-如果一个数据库访问错误发生或给定的列数是出界
public <T> T unwrap(类<T> iface) throws SQLException
unwrap
递归调用的包装对象的结果。如果接收器没有包装,没有实现接口,然后
SQLException
抛出。
unwrap
接口
Wrapper
T
-类仿照这个类对象的类型
iface
-一个类定义一个接口,因此必须实现。
SQLException
-如果没有对象发现实现的接口
public boolean isWrapperFor(类<?> interfaces) throws SQLException
isWrapperFor
对包装对象的结果。如果这不实现接口,并不是一个包装器,返回错误。这种方法应该比
unwrap
使呼叫者可以使用这个方法来避免昂贵的
unwrap
调用可能失败的低成本运作的实施。如果此方法返回true,然后用相同的参数调用
unwrap
成功。
isWrapperFor
接口
Wrapper
interfaces
-一个类中定义一个接口。
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.