public int compareKeys(int iAreaDesc)
    {
        int iCompareValue = 0;
        boolean bForceUniqueKey = false;    // This method is only used by the physical table which do their own unique processing.
        int iKeyFieldCount = this.getKeyFields(bForceUniqueKey, false);
        for (int iKeyFieldSeq = DBConstants.MAIN_KEY_FIELD; iKeyFieldSeq < iKeyFieldCount; iKeyFieldSeq++)
        {
            KeyField keyField = this.getKeyField(iKeyFieldSeq, bForceUniqueKey);
            BaseField fldCurrent = keyField.getField(DBConstants.FILE_KEY_AREA);
            BaseField fldTemp = keyField.getField(iAreaDesc);
            iCompareValue = fldCurrent.compareTo(fldTemp);
            if (this.getKeyOrder(iKeyFieldSeq) == DBConstants.DESCENDING)
                iCompareValue = -iCompareValue;
            if (iCompareValue != 0)
                break;
        }
        return iCompareValue;
    }
public int compareKeys ( int iAreaDesc ) { int iCompareValue = 0 ; boolean bForceUniqueKey = false ; int iKeyFieldCount = this . getKeyFields ( bForceUniqueKey , false ) ; for ( int iKeyFieldSeq = DBConstants . MAIN_KEY_FIELD ; iKeyFieldSeq < iKeyFieldCount ; iKeyFieldSeq ++ ) { KeyField keyField = this . getKeyField ( iKeyFieldSeq , bForceUniqueKey ) ; BaseField fldCurrent = keyField . getField ( DBConstants . FILE_KEY_AREA ) ; BaseField fldTemp = keyField . getField ( iAreaDesc ) ; iCompareValue = fldCurrent . compareTo ( fldTemp ) ; if ( this . getKeyOrder ( iKeyFieldSeq ) == DBConstants . DESCENDING ) iCompareValue = - iCompareValue ; if ( iCompareValue != 0 ) break ; } return iCompareValue ; }
Compare these two keys and return the compare result.
@param iAreaDesc The temp key area to compare.
@return The compare result (see compareTo method).