|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object![]()
![]()
![]()
javax.sql.rowset.RowSetMetaDataImpl
, ResultSetMetaData
, RowSetMetaData

public class RowSetMetaDataImpl

, Serializable

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.
| Field Summary |
|---|
Fields inherited from interface java.sql.ResultSetMetaData ![]() |
|---|
columnNoNulls |
| Constructor Summary | |
|---|---|
RowSetMetaDataImpl
|
|
| Method Summary | |
|---|---|
String |
getCatalogName
Retrieves the catalog name of the table from which the value in the designated column was derived. |
String |
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. |
int |
getColumnCount
Retrieves the number of columns in the RowSet object
for which this RowSetMetaDataImpl object was created. |
int |
getColumnDisplaySize
Retrieves the normal maximum width in chars of the designated column. |
String |
getColumnLabel
Retrieves the the suggested column title for the designated column for use in printouts and displays. |
String |
getColumnName
Retrieves the name of the designated column. |
int |
getColumnType
Retrieves the type code (one of the java.sql.Types
constants) for the SQL type of the value stored in the
designated column. |
String |
getColumnTypeName
Retrieves the DBMS-specific type name for values stored in the designated column. |
int |
getPrecision
Retrieves the total number of digits for values stored in the designated column. |
int |
getScale
Retrieves the number of digits to the right of the decimal point for values stored in the designated column. |
String |
getSchemaName
Retrieves the schema name of the table from which the value in the designated column was derived. |
String |
getTableName
Retrieves the name of the table from which the value in the designated column was derived. |
boolean |
isAutoIncrement
Retrieves whether a value stored in the designated column is automatically numbered, and thus readonly. |
boolean |
isCaseSensitive
Indicates whether the case of the designated column's name matters. |
boolean |
isCurrency
Indicates whether a value stored in the designated column is a cash value. |
boolean |
isDefinitelyWritable
Indicates whether a write operation on the designated column will definitely succeed. |
int |
isNullable
Retrieves a constant indicating whether it is possible to store a NULL value in the designated column. |
boolean |
isReadOnly
Indicates whether the designated column is definitely not writable, thus readonly. |
boolean |
isSearchable
Indicates whether a value stored in the designated column can be used in a WHERE clause. |
boolean |
isSigned
Indicates whether a value stored in the designated column is a signed number. |
boolean |
isWritable
Indicates whether it is possible for a write operation on the designated column to succeed. |
void |
setAutoIncrement
Sets whether the designated column is automatically numbered, thus read-only, to the given boolean
value. |
void |
setCaseSensitive
Sets whether the name of the designated column is case sensitive to the given boolean. |
void |
setCatalogName
Sets the catalog name of the table from which the designated column was derived to catalogName. |
void |
setColumnCount
Sets to the given number the number of columns in the RowSet
object for which this RowSetMetaDataImpl object was created. |
void |
setColumnDisplaySize
Sets the normal maximum number of chars in the designated column to the given number. |
void |
setColumnLabel
Sets the suggested column label for use in printouts and displays, if any, to label. |
void |
setColumnName
Sets the column name of the designated column to the given name. |
void |
setColumnType
Sets the SQL type code for values stored in the designated column to the given type code from the class java.sql.Types. |
void |
setColumnTypeName
Sets the type name used by the data source for values stored in the designated column to the given type name. |
void |
setCurrency
Sets whether a value stored in the designated column is a cash value to the given boolean. |
void |
setNullable
Sets whether a value stored in the designated column can be set to NULL to the given constant from the interface
ResultSetMetaData. |
void |
setPrecision
Sets the total number of decimal digits in a value stored in the designated column to the given number. |
void |
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. |
void |
setSchemaName
Sets the designated column's table's schema name, if any, to schemaName. |
void |
setSearchable
Sets whether a value stored in the designated column can be used in a WHERE clause to the given boolean value. |
void |
setSigned
Sets whether a value stored in the designated column is a signed number to the given boolean. |
void |
setTableName
Sets the name of the table from which the designated column was derived to the given table name. |
Methods inherited from class java.lang.Object ![]() |
|---|
clone |
| Constructor Detail |
|---|

public RowSetMetaDataImpl()
| Method Detail |
|---|

public void setColumnCount(int columnCount)
throws SQLException

RowSet
object for which this RowSetMetaDataImpl object was created.
setColumnCount

in interface RowSetMetaData

columnCount - an int giving the number of columns in the
RowSet object
SQLException

- if the given number is equal to or less than zero

public void setAutoIncrement(int columnIndex,
boolean property)
throws SQLException

boolean
value.
setAutoIncrement

in interface RowSetMetaData

columnIndex - the first column is 1, the second is 2, and so on;
must be between 1 and the number of columns
in the rowset, inclusiveproperty - true if the given column is
automatically incremented; false
otherwise
SQLException - if a database access error occurs or
the given index is out of bounds
SQLException

- if a database access error occurs

public void setCaseSensitive(int columnIndex,
boolean property)
throws SQLException

boolean.
setCaseSensitive

in interface RowSetMetaData

columnIndex - the first column is 1, the second is 2, and so on;
must be between 1 and the number of columns
in the rowset, inclusiveproperty - true to indicate that the column
name is case sensitive; false otherwise
SQLException

- if a database access error occurs or
the given column number is out of bounds

public void setSearchable(int columnIndex,
boolean property)
throws SQLException

WHERE clause to the given boolean value.
setSearchable

in interface RowSetMetaData

columnIndex - the first column is 1, the second is 2, and so on;
must be between 1 and the number
of columns in the rowset, inclusiveproperty - true to indicate that a column
value can be used in a WHERE clause;
false otherwise
SQLException - if a database access error occurs or
the given column number is out of bounds
SQLException

- if a database access error occurs

public void setCurrency(int columnIndex,
boolean property)
throws SQLException

boolean.
setCurrency

in interface RowSetMetaData

columnIndex - 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, inclusiveproperty - true if the value is a cash value; false otherwise.
SQLException - if a database access error occurs
or the given column number is out of bounds
SQLException

- if a database access error occurs

public void setNullable(int columnIndex,
int property)
throws SQLException

NULL to the given constant from the interface
ResultSetMetaData.
setNullable

in interface RowSetMetaData

columnIndex - the first column is 1, the second is 2, and so on;
must be between 1 and the number of columns, inclusiveproperty - one of the following ResultSetMetaData constants:
columnNoNulls,
columnNullable, or
columnNullableUnknown
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
SQLException

- if a database access error occurs

public void setSigned(int columnIndex,
boolean property)
throws SQLException

boolean.
setSigned

in interface RowSetMetaData

columnIndex - the first column is 1, the second is 2, and so on;
must be between 1 and the number of columns, inclusiveproperty - true to indicate that a column
value is a signed number;
false to indicate that it is not
SQLException

- if a database access error occurs
or the given column number is out of bounds

public void setColumnDisplaySize(int columnIndex,
int size)
throws SQLException

setColumnDisplaySize

in interface RowSetMetaData

columnIndex - the first column is 1, the second is 2, and so on;
must be between 1 and the number of columns, inclusivesize - the maximum size of the column in chars; must be
0 or more
SQLException

- if a database access error occurs,
the given column number is out of bounds, or size is
less than 0

public void setColumnLabel(int columnIndex,
String
label)
throws SQLException

null, the column label is set to an empty string
("").
setColumnLabel

in interface RowSetMetaData

columnIndex - the first column is 1, the second is 2, and so on;
must be between 1 and the number of columns, inclusivelabel - the column label to be used in printouts and displays; if the
column label is null, an empty String is
set
SQLException

- if a database access error occurs
or the given column index is out of bounds

public void setColumnName(int columnIndex,
String
columnName)
throws SQLException

setColumnName

in interface RowSetMetaData

columnIndex - the first column is 1, the second is 2, and so on;
must be between 1 and the number of columns, inclusivecolumnName - a String object indicating the column name;
if the given name is null, an empty String
is set
SQLException

- if a database access error occurs or the given column
index is out of bounds

public void setSchemaName(int columnIndex,
String
schemaName)
throws SQLException

null,
the schema name is set to an empty string ("").
setSchemaName

in interface RowSetMetaData

columnIndex - the first column is 1, the second is 2, and so on;
must be between 1 and the number of columns, inclusiveschemaName - the schema name for the table from which a value in the
designated column was derived; may be an empty String
or null
SQLException

- if a database access error occurs
or the given column number is out of bounds

public void setPrecision(int columnIndex,
int precision)
throws SQLException

setPrecision

in interface RowSetMetaData

columnIndex - the first column is 1, the second is 2, and so on;
must be between 1 and the number of columns, inclusiveprecision - the total number of decimal digits; must be 0
or more
SQLException

- if a database access error occurs,
columnIndex is out of bounds, or precision
is less than 0

public void setScale(int columnIndex,
int scale)
throws SQLException

setScale

in interface RowSetMetaData

columnIndex - the first column is 1, the second is 2, and so on;
must be between 1 and the number of columns, inclusivescale - the number of digits to the right of the decimal point; must be
zero or greater
SQLException