-
- All Superinterfaces:
ResultSetMetaData,Wrapper
- All Known Implementing Classes:
RowSetMetaDataImpl
public interface RowSetMetaData extends ResultSetMetaData
An object that contains information about the columns in aRowSetobject. This interface is an extension of theResultSetMetaDatainterface with methods for setting the values in aRowSetMetaDataobject. When aRowSetReaderobject reads data into aRowSetobject, it creates aRowSetMetaDataobject and initializes it using the methods in theRowSetMetaDatainterface. Then the reader passes theRowSetMetaDataobject to the rowset.The methods in this interface are invoked internally when an application calls the method
RowSet.execute; an application programmer would not use them directly.- Since:
- 1.4
-
-
Field Summary
-
Fields declared in interface java.sql.ResultSetMetaData
columnNoNulls, columnNullable, columnNullableUnknown
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidsetAutoIncrement(int columnIndex, boolean property)Sets whether the designated column is automatically numbered, The default is for aRowSetobject's columns not to be automatically numbered.voidsetCaseSensitive(int columnIndex, boolean property)Sets whether the designated column is case sensitive.voidsetCatalogName(int columnIndex, String catalogName)Sets the designated column's table's catalog name, if any, to the givenString.voidsetColumnCount(int columnCount)Sets the number of columns in theRowSetobject to the given number.voidsetColumnDisplaySize(int columnIndex, int size)Sets the designated column's normal maximum width in chars to the givenint.voidsetColumnLabel(int columnIndex, String label)Sets the suggested column title for use in printouts and displays, if any, to the givenString.voidsetColumnName(int columnIndex, String columnName)Sets the name of the designated column to the givenString.voidsetColumnType(int columnIndex, int SQLType)Sets the designated column's SQL type to the one given.voidsetColumnTypeName(int columnIndex, String typeName)Sets the designated column's type name that is specific to the data source, if any, to the givenString.voidsetCurrency(int columnIndex, boolean property)Sets whether the designated column is a cash value.voidsetNullable(int columnIndex, int property)Sets whether the designated column's value can be set toNULL.voidsetPrecision(int columnIndex, int precision)Sets the designated column's number of decimal digits to the givenint.voidsetScale(int columnIndex, int scale)Sets the designated column's number of digits to the right of the decimal point to the givenint.voidsetSchemaName(int columnIndex, String schemaName)Sets the name of the designated column's table's schema, if any, to the givenString.voidsetSearchable(int columnIndex, boolean property)Sets whether the designated column can be used in a where clause.voidsetSigned(int columnIndex, boolean property)Sets whether the designated column is a signed number.voidsetTableName(int columnIndex, String tableName)Sets the designated column's table name, if any, to the givenString.-
Methods declared in interface java.sql.ResultSetMetaData
getCatalogName, getColumnClassName, getColumnCount, getColumnDisplaySize, getColumnLabel, getColumnName, getColumnType, getColumnTypeName, getPrecision, getScale, getSchemaName, getTableName, isAutoIncrement, isCaseSensitive, isCurrency, isDefinitelyWritable, isNullable, isReadOnly, isSearchable, isSigned, isWritable
-
Methods declared in interface java.sql.Wrapper
isWrapperFor, unwrap
-
-
-
-
Method Detail
-
setColumnCount
void setColumnCount(int columnCount) throws SQLExceptionSets the number of columns in theRowSetobject to the given number.- Parameters:
columnCount- the number of columns in theRowSetobject- Throws:
SQLException- if a database access error occurs
-
setAutoIncrement
void setAutoIncrement(int columnIndex, boolean property) throws SQLExceptionSets whether the designated column is automatically numbered, The default is for aRowSetobject's columns not to be automatically numbered.- Parameters:
columnIndex- the first column is 1, the second is 2, ...property-trueif the column is automatically numbered;falseif it is not- Throws:
SQLException- if a database access error occurs
-
setCaseSensitive
void setCaseSensitive(int columnIndex, boolean property) throws SQLExceptionSets whether the designated column is case sensitive. The default isfalse.- Parameters:
columnIndex- the first column is 1, the second is 2, ...property-trueif the column is case sensitive;falseif it is not- Throws:
SQLException- if a database access error occurs
-
setSearchable
void setSearchable(int columnIndex, boolean property) throws SQLExceptionSets whether the designated column can be used in a where clause. The default isfalse.- Parameters:
columnIndex- the first column is 1, the second is 2, ...property-trueif the column can be used in aWHEREclause;falseif it cannot- Throws:
SQLException- if a database access error occurs
-
setCurrency
void setCurrency(int columnIndex, boolean property) throws SQLExceptionSets whether the designated column is a cash value. The default isfalse.- Parameters:
columnIndex- the first column is 1, the second is 2, ...property-trueif the column is a cash value;falseif it is not- Throws:
SQLException- if a database access error occurs
-
setNullable
void setNullable(int columnIndex, int property) throws SQLExceptionSets whether the designated column's value can be set toNULL. The default isResultSetMetaData.columnNullableUnknown- Parameters:
columnIndex- the first column is 1, the second is 2, ...property- one of the following constants:ResultSetMetaData.columnNoNulls,ResultSetMetaData.columnNullable, orResultSetMetaData.columnNullableUnknown- Throws:
SQLException- if a database access error occurs
-
setSigned
void setSigned(int columnIndex, boolean property) throws SQLExceptionSets whether the designated column is a signed number. The default isfalse.- Parameters:
columnIndex- the first column is 1, the second is 2, ...property-trueif the column is a signed number;falseif it is not- Throws:
SQLException- if a database access error occurs
-
setColumnDisplaySize
void setColumnDisplaySize(int columnIndex, int size) throws SQLExceptionSets the designated column's normal maximum width in chars to the givenint.- Parameters:
columnIndex- the first column is 1, the second is 2, ...size- the normal maximum number of characters for the designated column- Throws:
SQLException- if a database access error occurs
-
setColumnLabel
void setColumnLabel(int columnIndex, String label) throws SQLExceptionSets the suggested column title for use in printouts and displays, if any, to the givenString.- Parameters:
columnIndex- the first column is 1, the second is 2, ...label- the column title- Throws:
SQLException- if a database access error occurs
-
setColumnName
void setColumnName(int columnIndex, String columnName) throws SQLExceptionSets the name of the designated column to the givenString.- Parameters:
columnIndex- the first column is 1, the second is 2, ...columnName- the designated column's name- Throws:
SQLException- if a database access error occurs
-
setSchemaName
void setSchemaName(int columnIndex, String schemaName) throws SQLExceptionSets the name of the designated column's table's schema, if any, to the givenString.- Parameters:
columnIndex- the first column is 1, the second is 2, ...schemaName- the schema name- Throws:
SQLException- if a database access error occurs
-
setPrecision
void setPrecision(int columnIndex, int precision) throws SQLExceptionSets the designated column's number of decimal digits to the givenint.- Parameters:
columnIndex- the first column is 1, the second is 2, ...precision- the total number of decimal digits- Throws:
SQLException- if a database access error occurs
-
setScale
void setScale(int columnIndex, int scale) throws SQLExceptionSets the designated column's number of digits to the right of the decimal point to the givenint.- Parameters:
columnIndex- the first column is 1, the second is 2, ...scale- the number of digits to right of decimal point- Throws:
SQLException- if a database access error occurs
-
setTableName
void setTableName(int columnIndex, String tableName) throws SQLExceptionSets the designated column's table name, if any, to the givenString.- Parameters:
columnIndex- the first column is 1, the second is 2, ...tableName- the column's table name- Throws:
SQLException- if a database access error occurs
-
setCatalogName
void setCatalogName(int columnIndex, String catalogName) throws SQLExceptionSets the designated column's table's catalog name, if any, to the givenString.- Parameters:
columnIndex- the first column is 1, the second is 2, ...catalogName- the column's catalog name- Throws:
SQLException- if a database access error occurs
-
setColumnType
void setColumnType(int columnIndex, int SQLType) throws SQLExceptionSets the designated column's SQL type to the one given.- Parameters:
columnIndex- the first column is 1, the second is 2, ...SQLType- the column's SQL type- Throws:
SQLException- if a database access error occurs- See Also:
Types
-
setColumnTypeName
void setColumnTypeName(int columnIndex, String typeName) throws SQLExceptionSets the designated column's type name that is specific to the data source, if any, to the givenString.- Parameters:
columnIndex- the first column is 1, the second is 2, ...typeName- data source specific type name.- Throws:
SQLException- if a database access error occurs
-
-