APIdia Launch Partner
Top Description Inners Fields Constructors Methods
javax.sql.rowset

public Class RowSetMetaDataImpl

extends Object
implements RowSetMetaData, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, javax.sql.RowSetMetaData, java.sql.ResultSetMetaData, java.sql.Wrapper
Imports
java.sql.*, javax.sql.*, java.io.*, java.lang.reflect.*

Provides implementations for the methods that set and get metadata information about a RowSet object's columns. A RowSetMetaDataImpl object keeps track of the number of columns in the rowset and maintains an internal array of column attributes for each column.

A RowSet object creates a RowSetMetaDataImpl object internally in order to set and retrieve information about its columns.

Note

All metadata in a RowSetMetaDataImpl object should be considered as unavailable until the RowSet object that it describes is populated. Therefore, any RowSetMetaDataImpl method that retrieves information is defined as having unspecified behavior when it is called before the RowSet object contains data.

Since
1.5

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
RowSetMetaDataImpl.ColInfo

ColInfo objects are used to store information about each column in the RowSet object for which this RowSetMetaDataImpl object was created.

Field Summary

Modifier and TypeField and Description
private int
colCount

The number of columns in the RowSet object that created this RowSetMetaDataImpl object.

private RowSetMetaDataImpl.ColInfo[]
colInfo

An array of ColInfo objects used to store information about each column in the RowSet object for which this RowSetMetaDataImpl object was created.

pack-priv static final long

Constructor Summary

AccessConstructor and Description
public
RowSetMetaDataImpl()

Constructs a RowSetMetaDataImpl object.

Method Summary

Modifier and TypeMethod and Description
private void
checkColRange(int col)

Checks to see that the designated column is a valid column number for the RowSet object for which this RowSetMetaDataImpl was created.

private void
checkColType(int
an int defined in the class java.sql.Types
SQLType
)

Checks to see that the given SQL type is a valid column type and throws an SQLException object if it is not.

public String

Returns:

the catalog name of the column's table or an empty String if no catalog name is available
getCatalogName
(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
)

Implements java.sql.ResultSetMetaData.getCatalogName.

Retrieves the catalog name of the table from which the value in the designated column was derived.

public String

Returns:

the fully-qualified name of the class in the Java programming language that would be used by the method RowSet.getObject to retrieve the value in the specified column. This is the class name used for custom mapping when there is a custom mapping.
getColumnClassName
(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
)

Implements java.sql.ResultSetMetaData.getColumnClassName.

Retrieves the fully-qualified name of the class in the Java programming language to which a value in the designated column will be mapped.

public int

Returns:

the number of columns
getColumnCount
()

Implements java.sql.ResultSetMetaData.getColumnCount.

Retrieves the number of columns in the RowSet object for which this RowSetMetaDataImpl object was created.

public int

Returns:

the maximum number of chars that can be displayed in the designated column
getColumnDisplaySize
(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
)

Implements java.sql.ResultSetMetaData.getColumnDisplaySize.

Retrieves the normal maximum width in chars of the designated column.

public String

Returns:

the suggested column name to use in printouts and displays
getColumnLabel
(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
)

Implements java.sql.ResultSetMetaData.getColumnLabel.

Retrieves the suggested column title for the designated column for use in printouts and displays.

public String

Returns:

the column name of the designated column
getColumnName
(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
)

Implements java.sql.ResultSetMetaData.getColumnName.

Retrieves the name of the designated column.

public int

Returns:

an int representing the SQL type of values stored in the designated column
getColumnType
(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
)

Implements java.sql.ResultSetMetaData.getColumnType.

Retrieves the type code (one of the java.sql.Types constants) for the SQL type of the value stored in the designated column.

public String

Returns:

the type name used by the data source
getColumnTypeName
(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
)

Implements java.sql.ResultSetMetaData.getColumnTypeName.

Retrieves the DBMS-specific type name for values stored in the designated column.

public int

Returns:

the precision for values stored in the designated column
getPrecision
(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
)

Implements java.sql.ResultSetMetaData.getPrecision.

Retrieves the total number of digits for values stored in the designated column.

public int

Returns:

the scale for values stored in the designated column
getScale
(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
)

Implements java.sql.ResultSetMetaData.getScale.

Retrieves the number of digits to the right of the decimal point for values stored in the designated column.

public String

Returns:

the schema name or an empty String if no schema name is available
getSchemaName
(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
)

Implements java.sql.ResultSetMetaData.getSchemaName.

Retrieves the schema name of the table from which the value in the designated column was derived.

public String

Returns:

the table name or an empty String if no table name is available
getTableName
(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
)

Implements java.sql.ResultSetMetaData.getTableName.

Retrieves the name of the table from which the value in the designated column was derived.

public boolean

Returns:

true if the column is automatically numbered; false otherwise
isAutoIncrement
(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
)

Implements java.sql.ResultSetMetaData.isAutoIncrement.

Retrieves whether a value stored in the designated column is automatically numbered, and thus readonly.

public boolean

Returns:

true if the column name is case sensitive; false otherwise
isCaseSensitive
(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
)

Implements java.sql.ResultSetMetaData.isCaseSensitive.

Indicates whether the case of the designated column's name matters.

public boolean

Returns:

true if a value in the designated column is a cash value; false otherwise
isCurrency
(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
)

Implements java.sql.ResultSetMetaData.isCurrency.

Indicates whether a value stored in the designated column is a cash value.

public boolean

Returns:

true if a write operation on the designated column will definitely succeed; false otherwise
isDefinitelyWritable
(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
)

Implements java.sql.ResultSetMetaData.isDefinitelyWritable.

Indicates whether a write operation on the designated column will definitely succeed.

public int

Returns:

a constant from the ResultSetMetaData interface; either columnNoNulls, columnNullable, or columnNullableUnknown
isNullable
(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
)

Implements java.sql.ResultSetMetaData.isNullable.

Retrieves a constant indicating whether it is possible to store a NULL value in the designated column.

public boolean

Returns:

true if this RowSet object is read-Only and thus not updatable; false otherwise
isReadOnly
(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
)

Implements java.sql.ResultSetMetaData.isReadOnly.

Indicates whether the designated column is definitely not writable, thus readonly.

public boolean

Returns:

true if a value in the designated column can be used in a WHERE clause; false otherwise
isSearchable
(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
)

Implements java.sql.ResultSetMetaData.isSearchable.

Indicates whether a value stored in the designated column can be used in a WHERE clause.

public boolean

Returns:

true if a value in the designated column is a signed number; false otherwise
isSigned
(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
)

Implements java.sql.ResultSetMetaData.isSigned.

Indicates whether a value stored in the designated column is a signed number.

public boolean

Returns:

true if this implements the interface or directly or indirectly wraps an object that does.
isWrapperFor
(Class<?>
a Class defining an interface.
interfaces
)

Implements java.sql.Wrapper.isWrapperFor.

Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does.

public boolean

Returns:

true if a write operation on the designated column may will succeed; false otherwise
isWritable
(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
)

Implements java.sql.ResultSetMetaData.isWritable.

Indicates whether it is possible for a write operation on the designated column to succeed.

public void
setAutoIncrement(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns in the rowset, inclusive
columnIndex
,
boolean
true if the given column is automatically incremented; false otherwise
property
)

Implements javax.sql.RowSetMetaData.setAutoIncrement.

Sets whether the designated column is automatically numbered, thus read-only, to the given boolean value.

public void
setCaseSensitive(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns in the rowset, inclusive
columnIndex
,
boolean
true to indicate that the column name is case sensitive; false otherwise
property
)

Implements javax.sql.RowSetMetaData.setCaseSensitive.

Sets whether the name of the designated column is case sensitive to the given boolean.

public void
setCatalogName(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
,
String
the column's table's catalog name; if the catalogName is null, an empty String is set
catalogName
)

Implements javax.sql.RowSetMetaData.setCatalogName.

Sets the catalog name of the table from which the designated column was derived to catalogName.

public void
setColumnCount(int
an int giving the number of columns in the RowSet object
columnCount
)

Implements javax.sql.RowSetMetaData.setColumnCount.

Sets to the given number the number of columns in the RowSet object for which this RowSetMetaDataImpl object was created.

public void
setColumnDisplaySize(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
,
int
the maximum size of the column in chars; must be 0 or more
size
)

Implements javax.sql.RowSetMetaData.setColumnDisplaySize.

Sets the normal maximum number of chars in the designated column to the given number.

public void
setColumnLabel(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
,
String
the column label to be used in printouts and displays; if the column label is null, an empty String is set
label
)

Implements javax.sql.RowSetMetaData.setColumnLabel.

Sets the suggested column label for use in printouts and displays, if any, to label.

public void
setColumnName(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
,
String
a String object indicating the column name; if the given name is null, an empty String is set
columnName
)

Implements javax.sql.RowSetMetaData.setColumnName.

Sets the column name of the designated column to the given name.

public void
setColumnType(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
,
int
the designated column's SQL type, which must be one of the constants in the class java.sql.Types
SQLType
)

Implements javax.sql.RowSetMetaData.setColumnType.

Sets the SQL type code for values stored in the designated column to the given type code from the class java.sql.Types.

public void
setColumnTypeName(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
,
String
the data source-specific type name; if typeName is null, an empty String is set
typeName
)

Implements javax.sql.RowSetMetaData.setColumnTypeName.

Sets the type name used by the data source for values stored in the designated column to the given type name.

public void
setCurrency(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive between 1 and the number of columns, inclusive
columnIndex
,
boolean
true if the value is a cash value; false otherwise.
property
)

Implements javax.sql.RowSetMetaData.setCurrency.

Sets whether a value stored in the designated column is a cash value to the given boolean.

public void
setNullable(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
,
int
one of the following ResultSetMetaData constants: columnNoNulls, columnNullable, or columnNullableUnknown
property
)

Implements javax.sql.RowSetMetaData.setNullable.

Sets whether a value stored in the designated column can be set to NULL to the given constant from the interface ResultSetMetaData.

public void
setPrecision(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
,
int
the total number of decimal digits; must be 0 or more
precision
)

Implements javax.sql.RowSetMetaData.setPrecision.

Sets the total number of decimal digits in a value stored in the designated column to the given number.

public void
setScale(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
,
int
the number of digits to the right of the decimal point; must be zero or greater
scale
)

Implements javax.sql.RowSetMetaData.setScale.

Sets the number of digits to the right of the decimal point in a value stored in the designated column to the given number.

public void
setSchemaName(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
,
String
the schema name for the table from which a value in the designated column was derived; may be an empty String or null
schemaName
)

Implements javax.sql.RowSetMetaData.setSchemaName.

Sets the designated column's table's schema name, if any, to schemaName.

public void
setSearchable(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns in the rowset, inclusive
columnIndex
,
boolean
true to indicate that a column value can be used in a WHERE clause; false otherwise
property
)

Implements javax.sql.RowSetMetaData.setSearchable.

Sets whether a value stored in the designated column can be used in a WHERE clause to the given boolean value.

public void
setSigned(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
,
boolean
true to indicate that a column value is a signed number; false to indicate that it is not
property
)

Implements javax.sql.RowSetMetaData.setSigned.

Sets whether a value stored in the designated column is a signed number to the given boolean.

public void
setTableName(int
the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive
columnIndex
,
String
the column's table name; may be null or an empty string
tableName
)

Implements javax.sql.RowSetMetaData.setTableName.

Sets the name of the table from which the designated column was derived to the given table name.

public <T> T

Returns:

an object that implements the interface. May be a proxy for the actual implementing object.
unwrap
(Class<T>
A Class defining an interface that the result must implement.
iface
)

Implements java.sql.Wrapper.unwrap.

Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

colCountback to summary
private int colCount

The number of columns in the RowSet object that created this RowSetMetaDataImpl object.

colInfoback to summary
private RowSetMetaDataImpl.ColInfo[] colInfo

An array of ColInfo objects used to store information about each column in the RowSet object for which this RowSetMetaDataImpl object was created. The first ColInfo object in this array contains information about the first column in the RowSet object, the second element contains information about the second column, and so on.

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Constructor Detail

RowSetMetaDataImplback to summary
public RowSetMetaDataImpl()

Constructs a RowSetMetaDataImpl object.

Method Detail

checkColRangeback to summary
private void checkColRange(int col) throws SQLException

Checks to see that the designated column is a valid column number for the RowSet object for which this RowSetMetaDataImpl was created. To be valid, a column number must be greater than 0 and less than or equal to the number of columns in a row.

Exceptions
SQLException:
with the message "Invalid column index" if the given column number is out of the range of valid column numbers for the RowSet object
checkColTypeback to summary
private void checkColType(int SQLType) throws SQLException

Checks to see that the given SQL type is a valid column type and throws an SQLException object if it is not. To be valid, a SQL type must be one of the constant values in the java.sql.Types class.

Parameters
SQLType:int

an int defined in the class java.sql.Types

Exceptions
SQLException:
if the given int is not a constant defined in the class java.sql.Types
getCatalogNameback to summary
public String getCatalogName(int columnIndex) throws SQLException

Implements java.sql.ResultSetMetaData.getCatalogName.

Retrieves the catalog name of the table from which the value in the designated column was derived.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

Returns:String

the catalog name of the column's table or an empty String if no catalog name is available

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
getColumnClassNameback to summary
public String getColumnClassName(int columnIndex) throws SQLException

Implements java.sql.ResultSetMetaData.getColumnClassName.

Retrieves the fully-qualified name of the class in the Java programming language to which a value in the designated column will be mapped. For example, if the value is an int, the class name returned by this method will be java.lang.Integer.

If the value in the designated column has a custom mapping, this method returns the name of the class that implements SQLData. When the method ResultSet.getObject is called to retrieve a value from the designated column, it will create an instance of this class or one of its subclasses.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

Returns:String

the fully-qualified name of the class in the Java programming language that would be used by the method RowSet.getObject to retrieve the value in the specified column. This is the class name used for custom mapping when there is a custom mapping.

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
getColumnCountback to summary
public int getColumnCount() throws SQLException

Implements java.sql.ResultSetMetaData.getColumnCount.

Retrieves the number of columns in the RowSet object for which this RowSetMetaDataImpl object was created.

Returns:int

the number of columns

Exceptions
SQLException:
if an error occurs determining the column count
getColumnDisplaySizeback to summary
public int getColumnDisplaySize(int columnIndex) throws SQLException

Implements java.sql.ResultSetMetaData.getColumnDisplaySize.

Retrieves the normal maximum width in chars of the designated column.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

Returns:int

the maximum number of chars that can be displayed in the designated column

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
getColumnLabelback to summary
public String getColumnLabel(int columnIndex) throws SQLException

Implements java.sql.ResultSetMetaData.getColumnLabel.

Retrieves the suggested column title for the designated column for use in printouts and displays.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

Returns:String

the suggested column name to use in printouts and displays

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
getColumnNameback to summary
public String getColumnName(int columnIndex) throws SQLException

Implements java.sql.ResultSetMetaData.getColumnName.

Retrieves the name of the designated column.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

Returns:String

the column name of the designated column

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
getColumnTypeback to summary
public int getColumnType(int columnIndex) throws SQLException

Implements java.sql.ResultSetMetaData.getColumnType.

Retrieves the type code (one of the java.sql.Types constants) for the SQL type of the value stored in the designated column.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

Returns:int

an int representing the SQL type of values stored in the designated column

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
See Also
java.sql.Types
getColumnTypeNameback to summary
public String getColumnTypeName(int columnIndex) throws SQLException

Implements java.sql.ResultSetMetaData.getColumnTypeName.

Retrieves the DBMS-specific type name for values stored in the designated column.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

Returns:String

the type name used by the data source

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
getPrecisionback to summary
public int getPrecision(int columnIndex) throws SQLException

Implements java.sql.ResultSetMetaData.getPrecision.

Retrieves the total number of digits for values stored in the designated column.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

Returns:int

the precision for values stored in the designated column

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
getScaleback to summary
public int getScale(int columnIndex) throws SQLException

Implements java.sql.ResultSetMetaData.getScale.

Retrieves the number of digits to the right of the decimal point for values stored in the designated column.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

Returns:int

the scale for values stored in the designated column

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
getSchemaNameback to summary
public String getSchemaName(int columnIndex) throws SQLException

Implements java.sql.ResultSetMetaData.getSchemaName.

Retrieves the schema name of the table from which the value in the designated column was derived.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

Returns:String

the schema name or an empty String if no schema name is available

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
getTableNameback to summary
public String getTableName(int columnIndex) throws SQLException

Implements java.sql.ResultSetMetaData.getTableName.

Retrieves the name of the table from which the value in the designated column was derived.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

Returns:String

the table name or an empty String if no table name is available

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
isAutoIncrementback to summary
public boolean isAutoIncrement(int columnIndex) throws SQLException

Implements java.sql.ResultSetMetaData.isAutoIncrement.

Retrieves whether a value stored in the designated column is automatically numbered, and thus readonly.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

Returns:boolean

true if the column is automatically numbered; false otherwise

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
isCaseSensitiveback to summary
public boolean isCaseSensitive(int columnIndex) throws SQLException

Implements java.sql.ResultSetMetaData.isCaseSensitive.

Indicates whether the case of the designated column's name matters.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

Returns:boolean

true if the column name is case sensitive; false otherwise

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
isCurrencyback to summary
public boolean isCurrency(int columnIndex) throws SQLException

Implements java.sql.ResultSetMetaData.isCurrency.

Indicates whether a value stored in the designated column is a cash value.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

Returns:boolean

true if a value in the designated column is a cash value; false otherwise

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
isDefinitelyWritableback to summary
public boolean isDefinitelyWritable(int columnIndex) throws SQLException

Implements java.sql.ResultSetMetaData.isDefinitelyWritable.

Indicates whether a write operation on the designated column will definitely succeed.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

Returns:boolean

true if a write operation on the designated column will definitely succeed; false otherwise

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
isNullableback to summary
public int isNullable(int columnIndex) throws SQLException

Implements java.sql.ResultSetMetaData.isNullable.

Retrieves a constant indicating whether it is possible to store a NULL value in the designated column.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

Returns:int

a constant from the ResultSetMetaData interface; either columnNoNulls, columnNullable, or columnNullableUnknown

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
isReadOnlyback to summary
public boolean isReadOnly(int columnIndex) throws SQLException

Implements java.sql.ResultSetMetaData.isReadOnly.

Indicates whether the designated column is definitely not writable, thus readonly.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

Returns:boolean

true if this RowSet object is read-Only and thus not updatable; false otherwise

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
isSearchableback to summary
public boolean isSearchable(int columnIndex) throws SQLException

Implements java.sql.ResultSetMetaData.isSearchable.

Indicates whether a value stored in the designated column can be used in a WHERE clause.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

Returns:boolean

true if a value in the designated column can be used in a WHERE clause; false otherwise

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
isSignedback to summary
public boolean isSigned(int columnIndex) throws SQLException

Implements java.sql.ResultSetMetaData.isSigned.

Indicates whether a value stored in the designated column is a signed number.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

Returns:boolean

true if a value in the designated column is a signed number; false otherwise

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
isWrapperForback to summary
public boolean isWrapperFor(Class<?> interfaces) throws SQLException

Implements java.sql.Wrapper.isWrapperFor.

Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does. Returns false otherwise. If this implements the interface then return true, else if this is a wrapper then return the result of recursively calling isWrapperFor on the wrapped object. If this does not implement the interface and is not a wrapper, return false. This method should be implemented as a low-cost operation compared to unwrap so that callers can use this method to avoid expensive unwrap calls that may fail. If this method returns true then calling unwrap with the same argument should succeed.

Parameters
interfaces:Class<?>

a Class defining an interface.

Returns:boolean

true if this implements the interface or directly or indirectly wraps an object that does.

Exceptions
SQLException:
if an error occurs while determining whether this is a wrapper for an object with the given interface.
Since
1.6
isWritableback to summary
public boolean isWritable(int columnIndex) throws SQLException

Implements java.sql.ResultSetMetaData.isWritable.

Indicates whether it is possible for a write operation on the designated column to succeed. A return value of true means that a write operation may or may not succeed.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

Returns:boolean

true if a write operation on the designated column may will succeed; false otherwise

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
setAutoIncrementback to summary
public void setAutoIncrement(int columnIndex, boolean property) throws SQLException

Implements javax.sql.RowSetMetaData.setAutoIncrement.

Sets whether the designated column is automatically numbered, thus read-only, to the given boolean value.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns in the rowset, inclusive

property:boolean

true if the given column is automatically incremented; false otherwise

Exceptions
SQLException:
if a database access error occurs or the given index is out of bounds
setCaseSensitiveback to summary
public void setCaseSensitive(int columnIndex, boolean property) throws SQLException

Implements javax.sql.RowSetMetaData.setCaseSensitive.

Sets whether the name of the designated column is case sensitive to the given boolean.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns in the rowset, inclusive

property:boolean

true to indicate that the column name is case sensitive; false otherwise

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
setCatalogNameback to summary
public void setCatalogName(int columnIndex, String catalogName) throws SQLException

Implements javax.sql.RowSetMetaData.setCatalogName.

Sets the catalog name of the table from which the designated column was derived to catalogName. If catalogName is null, the catalog name is set to an empty string.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

catalogName:String

the column's table's catalog name; if the catalogName is null, an empty String is set

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
setColumnCountback to summary
public void setColumnCount(int columnCount) throws SQLException

Implements javax.sql.RowSetMetaData.setColumnCount.

Sets to the given number the number of columns in the RowSet object for which this RowSetMetaDataImpl object was created.

Parameters
columnCount:int

an int giving the number of columns in the RowSet object

Exceptions
SQLException:
if the given number is equal to or less than zero
setColumnDisplaySizeback to summary
public void setColumnDisplaySize(int columnIndex, int size) throws SQLException

Implements javax.sql.RowSetMetaData.setColumnDisplaySize.

Sets the normal maximum number of chars in the designated column to the given number.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

size:int

the maximum size of the column in chars; must be 0 or more

Exceptions
SQLException:
if a database access error occurs, the given column number is out of bounds, or size is less than 0
setColumnLabelback to summary
public void setColumnLabel(int columnIndex, String label) throws SQLException

Implements javax.sql.RowSetMetaData.setColumnLabel.

Sets the suggested column label for use in printouts and displays, if any, to label. If label is null, the column label is set to an empty string ("").

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

label:String

the column label to be used in printouts and displays; if the column label is null, an empty String is set

Exceptions
SQLException:
if a database access error occurs or the given column index is out of bounds
setColumnNameback to summary
public void setColumnName(int columnIndex, String columnName) throws SQLException

Implements javax.sql.RowSetMetaData.setColumnName.

Sets the column name of the designated column to the given name.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

columnName:String

a String object indicating the column name; if the given name is null, an empty String is set

Exceptions
SQLException:
if a database access error occurs or the given column index is out of bounds
setColumnTypeback to summary
public void setColumnType(int columnIndex, int SQLType) throws SQLException

Implements javax.sql.RowSetMetaData.setColumnType.

Sets the SQL type code for values stored in the designated column to the given type code from the class java.sql.Types.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

SQLType:int

the designated column's SQL type, which must be one of the constants in the class java.sql.Types

Exceptions
SQLException:
if a database access error occurs, the given column number is out of bounds, or the column type specified is not one of the constants in java.sql.Types
See Also
java.sql.Types
setColumnTypeNameback to summary
public void setColumnTypeName(int columnIndex, String typeName) throws SQLException

Implements javax.sql.RowSetMetaData.setColumnTypeName.

Sets the type name used by the data source for values stored in the designated column to the given type name.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

typeName:String

the data source-specific type name; if typeName is null, an empty String is set

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
setCurrencyback to summary
public void setCurrency(int columnIndex, boolean property) throws SQLException

Implements javax.sql.RowSetMetaData.setCurrency.

Sets whether a value stored in the designated column is a cash value to the given boolean.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive between 1 and the number of columns, inclusive

property:boolean

true if the value is a cash value; false otherwise.

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
setNullableback to summary
public void setNullable(int columnIndex, int property) throws SQLException

Implements javax.sql.RowSetMetaData.setNullable.

Sets whether a value stored in the designated column can be set to NULL to the given constant from the interface ResultSetMetaData.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

property:int

one of the following ResultSetMetaData constants: columnNoNulls, columnNullable, or columnNullableUnknown

Exceptions
SQLException:
if a database access error occurs, the given column number is out of bounds, or the value supplied for the property parameter is not one of the following constants: ResultSetMetaData.columnNoNulls, ResultSetMetaData.columnNullable, or ResultSetMetaData.columnNullableUnknown
setPrecisionback to summary
public void setPrecision(int columnIndex, int precision) throws SQLException

Implements javax.sql.RowSetMetaData.setPrecision.

Sets the total number of decimal digits in a value stored in the designated column to the given number.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

precision:int

the total number of decimal digits; must be 0 or more

Exceptions
SQLException:
if a database access error occurs, columnIndex is out of bounds, or precision is less than 0
setScaleback to summary
public void setScale(int columnIndex, int scale) throws SQLException

Implements javax.sql.RowSetMetaData.setScale.

Sets the number of digits to the right of the decimal point in a value stored in the designated column to the given number.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

scale:int

the number of digits to the right of the decimal point; must be zero or greater

Exceptions
SQLException:
if a database access error occurs, columnIndex is out of bounds, or scale is less than 0
setSchemaNameback to summary
public void setSchemaName(int columnIndex, String schemaName) throws SQLException

Implements javax.sql.RowSetMetaData.setSchemaName.

Sets the designated column's table's schema name, if any, to schemaName. If schemaName is null, the schema name is set to an empty string ("").

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

schemaName:String

the schema name for the table from which a value in the designated column was derived; may be an empty String or null

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
setSearchableback to summary
public void setSearchable(int columnIndex, boolean property) throws SQLException

Implements javax.sql.RowSetMetaData.setSearchable.

Sets whether a value stored in the designated column can be used in a WHERE clause to the given boolean value.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns in the rowset, inclusive

property:boolean

true to indicate that a column value can be used in a WHERE clause; false otherwise

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
setSignedback to summary
public void setSigned(int columnIndex, boolean property) throws SQLException

Implements javax.sql.RowSetMetaData.setSigned.

Sets whether a value stored in the designated column is a signed number to the given boolean.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

property:boolean

true to indicate that a column value is a signed number; false to indicate that it is not

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
setTableNameback to summary
public void setTableName(int columnIndex, String tableName) throws SQLException

Implements javax.sql.RowSetMetaData.setTableName.

Sets the name of the table from which the designated column was derived to the given table name.

Parameters
columnIndex:int

the first column is 1, the second is 2, and so on; must be between 1 and the number of columns, inclusive

tableName:String

the column's table name; may be null or an empty string

Exceptions
SQLException:
if a database access error occurs or the given column number is out of bounds
unwrapback to summary
public <T> T unwrap(Class<T> iface) throws SQLException

Implements java.sql.Wrapper.unwrap.

Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy. The result may be either the object found to implement the interface or a proxy for that object. If the receiver implements the interface then that is the object. If the receiver is a wrapper and the wrapped object implements the interface then that is the object. Otherwise the object is the result of calling unwrap recursively on the wrapped object. If the receiver is not a wrapper and does not implement the interface, then an SQLException is thrown.

Parameters
iface:Class<T>

A Class defining an interface that the result must implement.

Returns:T

an object that implements the interface. May be a proxy for the actual implementing object.

Exceptions
SQLException:
If no object found that implements the interface
Since
1.6
javax.sql.rowset back to summary

private Class RowSetMetaDataImpl.ColInfo

extends Object
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable

ColInfo objects are used to store information about each column in the RowSet object for which this RowSetMetaDataImpl object was created.

Field Summary

Modifier and TypeField and Description
public boolean
autoIncrement

The field that indicates whether the value in this column is a number that is incremented automatically, which makes the value read-only.

public boolean
caseSensitive

The field that indicates whether the value in this column is case sensitive.

public String
catName

The field that holds the catalog name for the table from which this column was derived.

public int
colPrecision

The field that holds the precision of the value in this column.

public int
colScale

The field that holds the scale (number of digits to the right of the decimal point) of the value in this column.

public int
colType

The field that holds the type code from the class java.sql.Types indicating the type of the value in this column.

public String
colTypeName

The field that holds the type name used by this particular data source for the value stored in this column.

public int
columnDisplaySize

The field that indicates the normal maximum width in characters for this column.

public String
columnLabel

The field that holds the suggested column title for this column, to be used in printing and displays.

public String
columnName

The field that holds the name of this column.

public boolean
currency

The field that indicates whether the value in this column is a cash value true means that it is; false that it is not.

public int
nullable

The field that indicates whether the value in this column is nullable.

public boolean
readOnly

The field that holds the updatability boolean per column of a RowSet

public String
schemaName

The field that holds the schema name for the table from which this column was derived.

public boolean
searchable

The field that indicates whether the value in this column can be used in a WHERE clause.

pack-priv static final long
public boolean
signed

The field that indicates whether the value in this column is a signed number.

public String
tableName

The field that holds the name of the table from which this column was derived.

public boolean
writable

The field that hold the writable boolean per column of a RowSet

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

autoIncrementback to summary
public boolean autoIncrement

The field that indicates whether the value in this column is a number that is incremented automatically, which makes the value read-only. true means that the value in this column is automatically numbered; false means that it is not.

caseSensitiveback to summary
public boolean caseSensitive

The field that indicates whether the value in this column is case sensitive. true means that it is; false that it is not.

catNameback to summary
public String catName

The field that holds the catalog name for the table from which this column was derived. If the DBMS does not support catalogs, the value may be the empty string.

colPrecisionback to summary
public int colPrecision

The field that holds the precision of the value in this column. For number types, the precision is the total number of decimal digits; for character types, it is the maximum number of characters; for binary types, it is the maximum length in bytes.

colScaleback to summary
public int colScale

The field that holds the scale (number of digits to the right of the decimal point) of the value in this column.

colTypeback to summary
public int colType

The field that holds the type code from the class java.sql.Types indicating the type of the value in this column.

colTypeNameback to summary
public String colTypeName

The field that holds the type name used by this particular data source for the value stored in this column.

columnDisplaySizeback to summary
public int columnDisplaySize

The field that indicates the normal maximum width in characters for this column.

columnLabelback to summary
public String columnLabel

The field that holds the suggested column title for this column, to be used in printing and displays.

columnNameback to summary
public String columnName

The field that holds the name of this column.

currencyback to summary
public boolean currency

The field that indicates whether the value in this column is a cash value true means that it is; false that it is not.

nullableback to summary
public int nullable

The field that indicates whether the value in this column is nullable. The possible values are the ResultSet constants columnNoNulls, columnNullable, and columnNullableUnknown.

readOnlyback to summary
public boolean readOnly

The field that holds the updatability boolean per column of a RowSet

schemaNameback to summary
public String schemaName

The field that holds the schema name for the table from which this column was derived.

searchableback to summary
public boolean searchable

The field that indicates whether the value in this column can be used in a WHERE clause. true means that it can; false that it cannot.

serialVersionUIDback to summary
pack-priv static final long serialVersionUID
signedback to summary
public boolean signed

The field that indicates whether the value in this column is a signed number. true means that it is; false that it is not.

tableNameback to summary
public String tableName

The field that holds the name of the table from which this column was derived. This value may be the empty string if there is no table name, such as when this column is produced by a join.

writableback to summary
public boolean writable

The field that hold the writable boolean per column of a RowSet

Constructor Detail

ColInfoback to summary
private ColInfo()