Interface RowSetMetaData

All Superinterfaces:
ResultSetMetaData, Wrapper
All Known Implementing Classes:
RowSetMetaDataImpl

public interface RowSetMetaData extends ResultSetMetaData
An object that contains information about the columns in a RowSet object. This interface is an extension of the ResultSetMetaData interface with methods for setting the values in a RowSetMetaData object. When a RowSetReader object reads data into a RowSet object, it creates a RowSetMetaData object and initializes it using the methods in the RowSetMetaData interface. Then the reader passes the RowSetMetaData object 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 ResultSetMetaData

    columnNoNulls, columnNullable, columnNullableUnknown
    Modifier and Type
    Field
    Description
    static final int
    The constant indicating that a column does not allow NULL values.
    static final int
    The constant indicating that a column allows NULL values.
    static final int
    The constant indicating that the nullability of a column's values is unknown.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setAutoIncrement(int columnIndex, boolean property)
    Sets whether the designated column is automatically numbered, The default is for a RowSet object's columns not to be automatically numbered.
    void
    setCaseSensitive(int columnIndex, boolean property)
    Sets whether the designated column is case sensitive.
    void
    setCatalogName(int columnIndex, String catalogName)
    Sets the designated column's table's catalog name, if any, to the given String.
    void
    setColumnCount(int columnCount)
    Sets the number of columns in the RowSet object to the given number.
    void
    setColumnDisplaySize(int columnIndex, int size)
    Sets the designated column's normal maximum width in chars to the given int.
    void
    setColumnLabel(int columnIndex, String label)
    Sets the suggested column title for use in printouts and displays, if any, to the given String.
    void
    setColumnName(int columnIndex, String columnName)
    Sets the name of the designated column to the given String.
    void
    setColumnType(int columnIndex, int SQLType)
    Sets the designated column's SQL type to the one given.
    void
    setColumnTypeName(int columnIndex, String typeName)
    Sets the designated column's type name that is specific to the data source, if any, to the given String.
    void
    setCurrency(int columnIndex, boolean property)
    Sets whether the designated column is a cash value.
    void
    setNullable(int columnIndex, int property)
    Sets whether the designated column's value can be set to NULL.
    void
    setPrecision(int columnIndex, int precision)
    Sets the designated column's number of decimal digits to the given int.
    void
    setScale(int columnIndex, int scale)
    Sets the designated column's number of digits to the right of the decimal point to the given int.
    void
    setSchemaName(int columnIndex, String schemaName)
    Sets the name of the designated column's table's schema, if any, to the given String.
    void
    setSearchable(int columnIndex, boolean property)
    Sets whether the designated column can be used in a where clause.
    void
    setSigned(int columnIndex, boolean property)
    Sets whether the designated column is a signed number.
    void
    setTableName(int columnIndex, String tableName)
    Sets the designated column's table name, if any, to the given String.

    Methods declared in interface ResultSetMetaData

    getCatalogName, getColumnClassName, getColumnCount, getColumnDisplaySize, getColumnLabel, getColumnName, getColumnType, getColumnTypeName, getPrecision, getScale, getSchemaName, getTableName, isAutoIncrement, isCaseSensitive, isCurrency, isDefinitelyWritable, isNullable, isReadOnly, isSearchable, isSigned, isWritable
    Modifier and Type
    Method
    Description
    getCatalogName(int column)
    Gets the designated column's table's catalog name.
    getColumnClassName(int column)
    Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column.
    int
    Returns the number of columns in this ResultSet object.
    int
    Indicates the designated column's normal maximum width in characters.
    getColumnLabel(int column)
    Gets the designated column's suggested title for use in printouts and displays.
    getColumnName(int column)
    Get the designated column's name.
    int
    getColumnType(int column)
    Retrieves the designated column's SQL type.
    getColumnTypeName(int column)
    Retrieves the designated column's database-specific type name.
    int
    getPrecision(int column)
    Get the designated column's specified column size.
    int
    getScale(int column)
    Gets the designated column's number of digits to right of the decimal point. 0 is returned for data types where the scale is not applicable.
    getSchemaName(int column)
    Get the designated column's table's schema.
    getTableName(int column)
    Gets the designated column's table name.
    boolean
    isAutoIncrement(int column)
    Indicates whether the designated column is automatically numbered.
    boolean
    isCaseSensitive(int column)
    Indicates whether a column's case matters.
    boolean
    isCurrency(int column)
    Indicates whether the designated column is a cash value.
    boolean
    Indicates whether a write on the designated column will definitely succeed.
    int
    isNullable(int column)
    Indicates the nullability of values in the designated column.
    boolean
    isReadOnly(int column)
    Indicates whether the designated column is definitely not writable.
    boolean
    isSearchable(int column)
    Indicates whether the designated column can be used in a where clause.
    boolean
    isSigned(int column)
    Indicates whether values in the designated column are signed numbers.
    boolean
    isWritable(int column)
    Indicates whether it is possible for a write on the designated column to succeed.

    Methods declared in interface Wrapper

    isWrapperFor, unwrap
    Modifier and Type
    Method
    Description
    boolean
    isWrapperFor(Class<?> iface)
    Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does.
    <T> T
    unwrap(Class<T> iface)
    Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by the proxy.
  • Method Details

    • setColumnCount

      void setColumnCount(int columnCount) throws SQLException
      Sets the number of columns in the RowSet object to the given number.
      Parameters:
      columnCount - the number of columns in the RowSet object
      Throws:
      SQLException - if a database access error occurs
    • setAutoIncrement

      void setAutoIncrement(int columnIndex, boolean property) throws SQLException
      Sets whether the designated column is automatically numbered, The default is for a RowSet object's columns not to be automatically numbered.
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      property - true if the column is automatically numbered; false if it is not
      Throws:
      SQLException - if a database access error occurs
    • setCaseSensitive

      void setCaseSensitive(int columnIndex, boolean property) throws SQLException
      Sets whether the designated column is case sensitive. The default is false.
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      property - true if the column is case sensitive; false if it is not
      Throws:
      SQLException - if a database access error occurs
    • setSearchable

      void setSearchable(int columnIndex, boolean property) throws SQLException
      Sets whether the designated column can be used in a where clause. The default is false.
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      property - true if the column can be used in a WHERE clause; false if it cannot
      Throws:
      SQLException - if a database access error occurs
    • setCurrency

      void setCurrency(int columnIndex, boolean property) throws SQLException
      Sets whether the designated column is a cash value. The default is false.
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      property - true if the column is a cash value; false if it is not
      Throws:
      SQLException - if a database access error occurs
    • setNullable

      void setNullable(int columnIndex, int property) throws SQLException
      Sets whether the designated column's value can be set to NULL. The default is ResultSetMetaData.columnNullableUnknown
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      property - one of the following constants: ResultSetMetaData.columnNoNulls, ResultSetMetaData.columnNullable, or ResultSetMetaData.columnNullableUnknown
      Throws:
      SQLException - if a database access error occurs
    • setSigned

      void setSigned(int columnIndex, boolean property) throws SQLException
      Sets whether the designated column is a signed number. The default is false.
      Parameters:
      columnIndex - the first column is 1, the second is 2, ...
      property - true if the column is a signed number; false if it is not
      Throws:
      SQLException - if a database access error occurs
    • setColumnDisplaySize

      void setColumnDisplaySize(int columnIndex, int size) throws SQLException
      Sets the designated column's normal maximum width in chars to the given int.
      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 SQLException
      Sets the suggested column title for use in printouts and displays, if any, to the given String.
      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 SQLException
      Sets the name of the designated column to the given String.
      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 SQLException
      Sets the name of the designated column's table's schema, if any, to the given String.
      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 SQLException
      Sets the designated column's number of decimal digits to the given int.
      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 SQLException
      Sets the designated column's number of digits to the right of the decimal point to the given int.
      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 SQLException
      Sets the designated column's table name, if any, to the given String.
      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 SQLException
      Sets the designated column's table's catalog name, if any, to the given String.
      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 SQLException
      Sets 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:
    • setColumnTypeName

      void setColumnTypeName(int columnIndex, String typeName) throws SQLException
      Sets the designated column's type name that is specific to the data source, if any, to the given String.
      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