Interface RowSetMetaData

public interface RowSetMetaData extends java.sql.ResultSetMetaData 

This interface provides methods that describe the rowset mainly through the ResultSetMetaData interface. The added methods enable you to set additional parameters to initialize the ResultSetMetaData.

Methods

setAutoIncrement

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

This sets a column as auto-incrementing. When a column is auto-incremented, its value cannot be updated by the application. This mechanism is used to create database-generated sequence numbers for individual rows in a given table. A SQLException is thrown if a database access error occurs.

Parameters:

columnIndex:

The column index, starting at 1

property:

true for auto-increment

setCaseSensitive

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

This specifies whether the column is case sensitive. A SQLException is thrown if a database access error occurs.

Parameters:

columnIndex:

The column index, starting at 1

property:

true for a case-sensitive column

setCatalogName

public void setCatalogName(int columnIndex, String catalogName) throws java.sql.SQLException

This sets the name of the catalog for the column. A SQLException is thrown if a database access error occurs.

Parameters:

columnIndex:

The index of the column, starting at 1

catalogName:

The column’s catalog name

setColumnCount

public void setColumnCount(int columnCount) throws java.sql.SQLException

This sets the number of columns in the RowSet. A SQLException is thrown if a database access error occurs.

Parameters:

columnCount:

The number of columns

setColumnDisplaySize

public void setColumnDisplaySize(int columnIndex, int size) throws java.sql.SQLException

This sets the preferred width in characters for the column. Applications should use this value as a minimum field size when displaying it on-screen, for example. A SQLException is thrown if a database access error occurs.

Parameters:

columnIndex:

The index of the column, starting at 1

size:

The size of the column

setColumnLabel

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

This method is used to provide a column title for a column of the rowset. A SQLException is thrown if a database access error occurs.

Parameters:

columnIndex:

The index of the column, starting at 1

label:

The title for the column

setColumnName

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

This specifies a name for the column. A SQLException is thrown if a database access error occurs.

Parameters:

columnIndex:

The index of the column, starting at 1

columnName:

The column name

setColumnType

public void setColumnType(int columnIndex, int SQLType) throws java.sql.SQLException

This sets the SQL type for the column. A SQLException is thrown if a database access error occurs.

Parameters:

columnIndex:

The index of the column, starting at 1

SQLType:

The SQL type for the column, as defined by one of the following:

  • Types.ARRAY

  • Types.BIGINT

  • Types.BINARY

  • Types.BIT

  • Types.BLOB

  • Types.BOOLEAN

  • Types.CHAR

  • Types.CLOB

  • Types.DATALINK

  • Types.DATE

  • Types.DECIMAL

  • Types.DISTINCT

  • Types.DOUBLE

  • Types.FLOAT

  • Types.INTEGER

  • Types.JAVA_OBJECT

  • Types.LONGVARBINARY

  • Types.LONGVARCHAR

  • Types.NULL

  • Types.NUMERIC

  • Types.OTHER

  • Types.REAL

  • Types.REF

  • Types.SMALLINT

  • Types.STRUCT

  • Types.TIME

  • Types.TIMESTAMP

  • Types.TINYINT

  • Types.VARBINARY

  • Types.VARCHAR

setColumnTypeName

public void setColumnTypeName(int columnIndex, String typeName) throws java.sql.SQLException

This sets the type name for the column. A SQLException is thrown if a database access error occurs.

Parameters:

columnIndex:

The index of the column, starting at 1

typeName:

The type name

setCurrency

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

This method is used to specify whether the column represents a money value. A SQLException is thrown if a database access error occurs.

Parameters:

columnIndex:

The index of the column, starting at 1

property:

true if the column represents a currency

setNullable

public void setNullable(int columnIndex, int property) throws java.sql.SQLException

This specifies whether the value of the column can be set to NULL in an insert or update. A SQLException is thrown if a database access error occurs.

Parameters:

columnIndex:

The index of the column, starting at 1

property:

Either one of columnNoNulls, columnNullable, or columnNullableUnknown, provided as attributes of the ResultSetMetaData class:

  • ResultSetMetaData.columnNoNulls: The specified column doesn’t allow NULL values.

  • ResultSetMetaData.columnNullable: The specified column allows NULL values.

  • ResultSetMetaData.columnNullableUnknown: The nullability of the specified column value is unknown.

setPrecision

public void setPrecision(int columnIndex, int precision) throws java.sql.SQLException

This specifies the number of decimal digits for the column. A SQLException is thrown if a database access error occurs.

Parameters:

columnIndex:

The index of the column, starting at 1

precision:

The number of decimal digits

setScale

public void setScale(int columnIndex, int scale) throws java.sql.SQLException

This specifies the number of digits to the right of the decimal point for the column. A SQLException is thrown if a database access error occurs.

Parameters:

columnIndex:

The index of the column, starting at 1

scale:

The number of digits to the right of the decimal point

setSchemaName

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

This sets the table schema for the column indicated. A SQLException is thrown if a database access error occurs.

Parameters:

columnIndex:

The index of the column, starting at 1

schemaName:

The schema name

setSearchable

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

This can be used to specify whether the column can be used in a SQL WHERE clause. A SQLException is thrown if a database access error occurs.

Parameters:

columnIndex:

The column index, starting at 1

property:

true if the column can be used in a WHERE clause

setSigned

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

This method sets the signed property for the column. A SQLException is thrown if a database access error occurs.

Parameters:

columnIndex:

The index of the column, starting at 1

property:

true if the column contains signed values

setTableName

public void setTableName(int columnIndex, String tableName) throws java.sql.SQLException

This sets the table name for the column. A SQLException is thrown if a database access error occurs.

Parameters:

columnIndex:

The index of the column, starting at 1

tableName:

The column’s table name



JDBC 3. 0. JAVA Database Connectivity
JDBC 3: Java Database Connectivity
ISBN: 0764548751
EAN: 2147483647
Year: 2002
Pages: 148

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net