com.ibm.jtopenlite.database.jdbc

Class JDBCResultSetMetaData

  • java.lang.Object
    • com.ibm.jtopenlite.database.jdbc.JDBCResultSetMetaData
    • Field Summary

      • Fields inherited from interface java.sql.ResultSetMetaData

        columnNoNulls, columnNullable, columnNullableUnknown
    • Constructor Summary

      Constructors 
      Constructor and Description
      JDBCResultSetMetaData(int serverCCSID, java.util.Calendar calendarUsedForConversions, java.lang.String catalog) 
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      void baseColumnName(int fieldIndex, java.lang.String name) 
      void baseSchemaName(int fieldIndex, java.lang.String name) 
      void baseTableName(int fieldIndex, java.lang.String name) 
      void columnAttributes(int fieldIndex, int updateable, int searchable, boolean isIdentity, boolean isAlwaysGenerated, boolean isPartOfAnyIndex, boolean isLoneUniqueIndex, boolean isPartOfUniqueIndex, boolean isExpression, boolean isPrimaryKey, boolean isNamed, boolean isRowID, boolean isRowChangeTimestamp) 
      void columnLabel(int fieldIndex, java.lang.String name) 
      void fieldDescription(int fieldIndex, int type, int length, int scale, int precision, int ccsid, int joinRefPosition, int attributeBitmap, int lobMaxSize) 
      void fieldName(int fieldIndex, java.lang.String name) 
      java.lang.String getCatalogName(int column)
      Not implemented.
      java.lang.String getColumnClassName(int column)
      Not implemented.
      int getColumnCount() 
      int getColumnDisplaySize(int column)
      Not implemented.
      java.lang.String getColumnLabel(int column) 
      java.lang.String getColumnName(int column) 
      int getColumnType(int column) 
      java.lang.String getColumnTypeName(int column) 
      int getPrecision(int column) 
      int getScale(int column) 
      java.lang.String getSchemaName(int column) 
      java.lang.String getTableName(int column) 
      boolean isAutoIncrement(int column) 
      boolean isCaseSensitive(int column) 
      boolean isCurrency(int column)
      Indicates if the column is a currency value.
      boolean isDefinitelyWritable(int column) 
      int isNullable(int column)
      Not implemented.
      boolean isReadOnly(int column) 
      boolean isSearchable(int column) 
      boolean isSigned(int column)
      Not implemented.
      boolean isWritable(int column) 
      void resultSetDescription(int numFields, int dateFormat, int timeFormat, int dateSeparator, int timeSeparator, int recordSize) 
      void setCacheLastOnly(int column, boolean b)
      Caches the last String returned by ResultSet.getString(column), and returns that same object on the next call to ResultSet.getString(column) if the value returned from the database is identical.
      void setCacheLastOnly(java.lang.String column, boolean b)
      You know you want this, if you're going to be calling getString() a lot.
      void setUseDateCache(int column, boolean b)
      Caches the last Date returned by ResultSet.getDate(column), and returns that same object on the next call to ResultSet.getDate(column) if the value returned from the database is identical.
      void setUseDateCache(java.lang.String column, boolean b)
      You know you want this, if you're going to be calling getDate() a lot.
      void setUseStringCache(int column, boolean b)
      Caches all unique Strings returned by ResultSet.getString(column).
      void setUseStringCache(java.lang.String column, boolean b)
      You know you want this, if you're going to be calling getString() a lot.
      void setUseTimeCache(int column, boolean b)
      Caches the last Time returned by ResultSet.getTime(column), and returns that same object on the next call to ResultSet.getTime(column) if the value returned from the database is identical.
      void setUseTimeCache(java.lang.String column, boolean b)
      You know you want this, if you're going to be calling getTime() a lot.
      void sqlFromSchema(int fieldIndex, java.lang.String name) 
      void sqlFromTable(int fieldIndex, java.lang.String name) 
      void udtName(int fieldIndex, java.lang.String name) 
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.sql.Wrapper

        isWrapperFor, unwrap
    • Constructor Detail

      • JDBCResultSetMetaData

        public JDBCResultSetMetaData(int serverCCSID,
                             java.util.Calendar calendarUsedForConversions,
                             java.lang.String catalog)
    • Method Detail

      • resultSetDescription

        public void resultSetDescription(int numFields,
                                int dateFormat,
                                int timeFormat,
                                int dateSeparator,
                                int timeSeparator,
                                int recordSize)
        Specified by:
        resultSetDescription in interface DatabaseDescribeCallback
      • fieldDescription

        public void fieldDescription(int fieldIndex,
                            int type,
                            int length,
                            int scale,
                            int precision,
                            int ccsid,
                            int joinRefPosition,
                            int attributeBitmap,
                            int lobMaxSize)
        Specified by:
        fieldDescription in interface DatabaseDescribeCallback
      • columnAttributes

        public void columnAttributes(int fieldIndex,
                            int updateable,
                            int searchable,
                            boolean isIdentity,
                            boolean isAlwaysGenerated,
                            boolean isPartOfAnyIndex,
                            boolean isLoneUniqueIndex,
                            boolean isPartOfUniqueIndex,
                            boolean isExpression,
                            boolean isPrimaryKey,
                            boolean isNamed,
                            boolean isRowID,
                            boolean isRowChangeTimestamp)
        Specified by:
        columnAttributes in interface DatabaseDescribeCallback
      • setUseDateCache

        public void setUseDateCache(int column,
                           boolean b)
        Caches the last Date returned by ResultSet.getDate(column), and returns that same object on the next call to ResultSet.getDate(column) if the value returned from the database is identical. This also works for repeated calls to ResultSet.getDate(column) when the ResultSet has not changed rows.
      • setUseDateCache

        public void setUseDateCache(java.lang.String column,
                           boolean b)
        You know you want this, if you're going to be calling getDate() a lot.
      • setUseTimeCache

        public void setUseTimeCache(int column,
                           boolean b)
        Caches the last Time returned by ResultSet.getTime(column), and returns that same object on the next call to ResultSet.getTime(column) if the value returned from the database is identical. This also works for repeated calls to ResultSet.getTime(column) when the ResultSet has not changed rows.
      • setUseTimeCache

        public void setUseTimeCache(java.lang.String column,
                           boolean b)
        You know you want this, if you're going to be calling getTime() a lot.
      • setUseStringCache

        public void setUseStringCache(int column,
                             boolean b)
        Caches all unique Strings returned by ResultSet.getString(column). Any subsequent call to ResultSet.getString(column) will attempt to return a previously cached object if the value returned from the database matches something in the cache. This also works for repeated calls to ResultSet.getString(column) when the ResultSet has not changed rows. Note this will cache *ALL* Strings for this column, so unless you know your column values will only ever be a finite set, you should also call setCacheLastOnly() and use an ORDER BY clause.
      • setUseStringCache

        public void setUseStringCache(java.lang.String column,
                             boolean b)
        You know you want this, if you're going to be calling getString() a lot.
      • setCacheLastOnly

        public void setCacheLastOnly(int column,
                            boolean b)
        Caches the last String returned by ResultSet.getString(column), and returns that same object on the next call to ResultSet.getString(column) if the value returned from the database is identical. This also works for repeated calls to ResultSet.getString(column) when the ResultSet has not changed rows. This setting only takes effect if setUseStringCache() was called with a value of true for this column.
      • setCacheLastOnly

        public void setCacheLastOnly(java.lang.String column,
                            boolean b)
        You know you want this, if you're going to be calling getString() a lot.
      • getCatalogName

        public java.lang.String getCatalogName(int column)
                                        throws java.sql.SQLException
        Not implemented.
        Specified by:
        getCatalogName in interface java.sql.ResultSetMetaData
        Throws:
        java.sql.SQLException
      • getColumnClassName

        public java.lang.String getColumnClassName(int column)
                                            throws java.sql.SQLException
        Not implemented.
        Specified by:
        getColumnClassName in interface java.sql.ResultSetMetaData
        Throws:
        java.sql.SQLException
      • getColumnCount

        public int getColumnCount()
                           throws java.sql.SQLException
        Specified by:
        getColumnCount in interface java.sql.ResultSetMetaData
        Throws:
        java.sql.SQLException
      • getColumnDisplaySize

        public int getColumnDisplaySize(int column)
                                 throws java.sql.SQLException
        Not implemented.
        Specified by:
        getColumnDisplaySize in interface java.sql.ResultSetMetaData
        Throws:
        java.sql.SQLException
      • getColumnLabel

        public java.lang.String getColumnLabel(int column)
                                        throws java.sql.SQLException
        Specified by:
        getColumnLabel in interface java.sql.ResultSetMetaData
        Throws:
        java.sql.SQLException
      • getColumnName

        public java.lang.String getColumnName(int column)
                                       throws java.sql.SQLException
        Specified by:
        getColumnName in interface java.sql.ResultSetMetaData
        Throws:
        java.sql.SQLException
      • getColumnType

        public int getColumnType(int column)
                          throws java.sql.SQLException
        Specified by:
        getColumnType in interface java.sql.ResultSetMetaData
        Throws:
        java.sql.SQLException
      • getColumnTypeName

        public java.lang.String getColumnTypeName(int column)
                                           throws java.sql.SQLException
        Specified by:
        getColumnTypeName in interface java.sql.ResultSetMetaData
        Throws:
        java.sql.SQLException
      • getPrecision

        public int getPrecision(int column)
                         throws java.sql.SQLException
        Specified by:
        getPrecision in interface java.sql.ResultSetMetaData
        Throws:
        java.sql.SQLException
      • getScale

        public int getScale(int column)
                     throws java.sql.SQLException
        Specified by:
        getScale in interface java.sql.ResultSetMetaData
        Throws:
        java.sql.SQLException
      • getSchemaName

        public java.lang.String getSchemaName(int column)
                                       throws java.sql.SQLException
        Specified by:
        getSchemaName in interface java.sql.ResultSetMetaData
        Throws:
        java.sql.SQLException
      • getTableName

        public java.lang.String getTableName(int column)
                                      throws java.sql.SQLException
        Specified by:
        getTableName in interface java.sql.ResultSetMetaData
        Throws:
        java.sql.SQLException
      • isAutoIncrement

        public boolean isAutoIncrement(int column)
                                throws java.sql.SQLException
        Specified by:
        isAutoIncrement in interface java.sql.ResultSetMetaData
        Throws:
        java.sql.SQLException
      • isCaseSensitive

        public boolean isCaseSensitive(int column)
                                throws java.sql.SQLException
        Specified by:
        isCaseSensitive in interface java.sql.ResultSetMetaData
        Throws:
        java.sql.SQLException
      • isCurrency

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

        public boolean isDefinitelyWritable(int column)
                                     throws java.sql.SQLException
        Specified by:
        isDefinitelyWritable in interface java.sql.ResultSetMetaData
        Throws:
        java.sql.SQLException
      • isNullable

        public int isNullable(int column)
                       throws java.sql.SQLException
        Not implemented.
        Specified by:
        isNullable in interface java.sql.ResultSetMetaData
        Throws:
        java.sql.SQLException
      • isReadOnly

        public boolean isReadOnly(int column)
                           throws java.sql.SQLException
        Specified by:
        isReadOnly in interface java.sql.ResultSetMetaData
        Throws:
        java.sql.SQLException
      • isSearchable

        public boolean isSearchable(int column)
                             throws java.sql.SQLException
        Specified by:
        isSearchable in interface java.sql.ResultSetMetaData
        Throws:
        java.sql.SQLException
      • isSigned

        public boolean isSigned(int column)
                         throws java.sql.SQLException
        Not implemented.
        Specified by:
        isSigned in interface java.sql.ResultSetMetaData
        Throws:
        java.sql.SQLException
      • isWritable

        public boolean isWritable(int column)
                           throws java.sql.SQLException
        Specified by:
        isWritable in interface java.sql.ResultSetMetaData
        Throws:
        java.sql.SQLException