com.ibm.as400.access

Class AS400JDBCResultSetMetaData


    • Method Detail

      • getCatalogName

        public String getCatalogName(int columnIndex)
                              throws SQLException
        Returns the catalog name of the table for a column.
        Specified by:
        getCatalogName in interface ResultSetMetaData
        Parameters:
        columnIndex - The column index (1-based).
        Returns:
        The catalog name.
        Throws:
        SQLException - If the column index is not valid.
      • getColumnClassName

        public String getColumnClassName(int columnIndex)
                                  throws SQLException
        Returns the name of a Java class whose instances are created if ResultSet.getObject() is called to retrieve from the column. The actual class created may be a subclass of the returned class.
        Specified by:
        getColumnClassName in interface ResultSetMetaData
        Parameters:
        columnIndex - The column index (1-based).
        Returns:
        The class name.
        Throws:
        SQLException - If the column index is not valid.
      • getColumnDisplaySize

        public int getColumnDisplaySize(int columnIndex)
                                 throws SQLException
        Returns the normal maximum width of a column.
        Specified by:
        getColumnDisplaySize in interface ResultSetMetaData
        Parameters:
        columnIndex - The column index (1-based).
        Returns:
        The normal maximum width (in characters).
        Throws:
        SQLException - If the column index is not valid.
      • getColumnLabel

        public String getColumnLabel(int columnIndex)
                              throws SQLException
        Returns the suggested label for use in printouts or displays for a column.
        Specified by:
        getColumnLabel in interface ResultSetMetaData
        Parameters:
        columnIndex - The column index (1-based).
        Returns:
        The column label if the user set the driver property "extended metadata" to true and the system returns us a column label, otherwise the column name.
        Throws:
        SQLException - If the column index is not valid.
      • getColumnName

        public String getColumnName(int columnIndex)
                             throws SQLException
        Returns the name of a column.
        Specified by:
        getColumnName in interface ResultSetMetaData
        Parameters:
        columnIndex - The column index (1-based).
        Returns:
        The column name.
        Throws:
        SQLException - If the column index is not valid.
      • getColumnType

        public int getColumnType(int columnIndex)
                          throws SQLException
        Returns the type of a column. If the type is a distinct type, this returns the underlying type.
        Specified by:
        getColumnType in interface ResultSetMetaData
        Parameters:
        columnIndex - The column index (1-based).
        Returns:
        The SQL type code defined in java.sql.Types.
        Throws:
        SQLException - If the column index is not valid.
      • getColumnTypeName

        public String getColumnTypeName(int columnIndex)
                                 throws SQLException
        Returns the type name of a column. If the type is a distinct type, this returns the underlying type name.
        Specified by:
        getColumnTypeName in interface ResultSetMetaData
        Parameters:
        columnIndex - The column index (1-based).
        Returns:
        The column type name.
        Throws:
        SQLException - If the column index is not valid.
      • getPrecision

        public int getPrecision(int columnIndex)
                         throws SQLException
        Returns the precision of a column. This is the number of decimal digits the column may hold.
        Specified by:
        getPrecision in interface ResultSetMetaData
        Parameters:
        columnIndex - The column index (1-based).
        Returns:
        The precision.
        Throws:
        SQLException - If the column index is not valid.
      • getScale

        public int getScale(int columnIndex)
                     throws SQLException
        Returns the scale of a column. This is number of digits to the right of the decimal point.
        Specified by:
        getScale in interface ResultSetMetaData
        Parameters:
        columnIndex - The column index (1-based).
        Returns:
        The scale.
        Throws:
        SQLException - If the column index is not valid.
      • getSchemaName

        public String getSchemaName(int columnIndex)
                             throws SQLException
        Returns the schema name of the table for a column. This method is supported only if the user has set the driver property "extended metadata" to true.
        Specified by:
        getSchemaName in interface ResultSetMetaData
        Parameters:
        columnIndex - The column index (1-based).
        Returns:
        The schema name if the user set the driver property "extended metadata" to true and the system returns us a schema name, otherwise "".
        Throws:
        SQLException - If the column index is not valid.
      • getTableName

        public String getTableName(int columnIndex)
                            throws SQLException
        Returns the column's table name. This method is supported only if the user has set the driver property "extended metadata" to true.
        Specified by:
        getTableName in interface ResultSetMetaData
        Parameters:
        columnIndex - The column index (1-based).
        Returns:
        The base table name if the user set the driver property "extended metadata" to true and the system returns us a table name, otherwise "".
        Throws:
        SQLException - If the column index is not valid.
      • isAutoIncrement

        public boolean isAutoIncrement(int columnIndex)
                                throws SQLException
        Indicates if the column is automatically numbered.
        Specified by:
        isAutoIncrement in interface ResultSetMetaData
        Parameters:
        columnIndex - The column index (1-based).
        Returns:
        True if column is autoincrement, false otherwise.
        Throws:
        SQLException - If the column index is not valid. Note: connection property "extended metadata" must be true for this method to be return accurate information. If the "extended metadata" connection property is not set to true, then this method will always return false.
      • isCaseSensitive

        public boolean isCaseSensitive(int columnIndex)
                                throws SQLException
        Indicates if the column is case sensitive.
        Specified by:
        isCaseSensitive in interface ResultSetMetaData
        Parameters:
        columnIndex - The column index (1-based).
        Returns:
        true if the column is case sensitive; false otherwise.
        Throws:
        SQLException - If the column index is not valid.
      • isCurrency

        public boolean isCurrency(int columnIndex)
                           throws SQLException
        Indicates if the column is a currency value.
        Specified by:
        isCurrency in interface ResultSetMetaData
        Parameters:
        columnIndex - The column index (1-based).
        Returns:
        Always false. DB2 for IBM i does not directly support currency values.
        Throws:
        SQLException - If the column index is not valid.
      • isDefinitelyWritable

        public boolean isDefinitelyWritable(int columnIndex)
                                     throws SQLException
        Indicates if a write on the column will definitely succeed.
        Specified by:
        isDefinitelyWritable in interface ResultSetMetaData
        Parameters:
        columnIndex - The column index (1-based).
        Returns:
        Always false. The driver does not check if the user has the necessary authority to write to the column.
        Throws:
        SQLException - If the column index is not valid.
      • isNullable

        public int isNullable(int columnIndex)
                       throws SQLException
        Indicates if the column can contain an SQL NULL value.
        Specified by:
        isNullable in interface ResultSetMetaData
        Parameters:
        columnIndex - The column index (1-based).
        Returns:
        true if the column is can contain an SQL NULL value; false otherwise.
        Throws:
        SQLException - If the column index is not valid.
      • isReadOnly

        public boolean isReadOnly(int columnIndex)
                           throws SQLException
        Indicates if the column is read-only.
        Specified by:
        isReadOnly in interface ResultSetMetaData
        Parameters:
        columnIndex - The column index (1-based).
        Returns:
        true if the column is read-only; false otherwise.
        Throws:
        SQLException - If the column index is not valid.
      • isSearchable

        public boolean isSearchable(int columnIndex)
                             throws SQLException
        Indicates if the column be used in a where clause.
        Specified by:
        isSearchable in interface ResultSetMetaData
        Parameters:
        columnIndex - The column index (1-based).
        Returns:
        If the user has set the "extended metadata" driver property to true, returns true if the column can be used in a where clause with any comparison operator except LIKE, returns false if the column cannot be used in a where clause. If the "extended metadata" driver property is set to false, true will always be returned.
        Throws:
        SQLException - If the column index is not valid.
      • isSigned

        public boolean isSigned(int columnIndex)
                         throws SQLException
        Indicates if the column can contain a signed value.
        Specified by:
        isSigned in interface ResultSetMetaData
        Parameters:
        columnIndex - The column index (1-based).
        Returns:
        true if the column is signed; false otherwise.
        Throws:
        SQLException - If the column index is not valid.
      • isWritable

        public boolean isWritable(int columnIndex)
                           throws SQLException
        Indicates if it is possible for a write on the column to succeed. The write may fail even if this method returns true. The accuracy of this method will be improved if the "extended metadata" property is set to true.
        Specified by:
        isWritable in interface ResultSetMetaData
        Parameters:
        columnIndex - The column index (1-based).
        Returns:
        true if it is possible for a write on the column to succeed; false otherwise.
        Throws:
        SQLException - If the column index is not valid.
      • toString

        public String toString()
        Returns the name of the SQL cursor in use by this result set.
        Overrides:
        toString in class Object
        Returns:
        The cursor name.
      • getValidWrappedList

        protected String[] getValidWrappedList()