code: public int compareKeys(int iAreaDesc, String strSeekSign, FieldTable table, KeyAreaInfo keyArea)
      {
          int compareValue = super.compareKeys(iAreaDesc, strSeekSign, table, keyArea);
          if (compareValue != 0)
              return compareValue;
          if (keyArea.getUniqueKeyCode() == Constants.UNIQUE)
              return compareValue;        // Found a matching record
          if ((strSeekSign == null) || (strSeekSign.equals("==")))
          {   // looking for an exact match!
              KeyAreaInfo keyArea2 = table.getRecord().getKeyArea(Constants.MAIN_KEY_AREA);
              if (keyArea == keyArea2)
                  return compareValue;        // Error? Primary key has to be unique
              compareValue = keyArea2.compareKeys(iAreaDesc);
          }
          return compareValue;
      }
docs: Compare these two keys and return the compare result.
  @param areaDesc The area that the key to compare is in.
  @param strSeekSign The seek sign.
  @param table The table.
  @param keyArea The table's key area.
  @return The compare result (-1, 0, or 1).