public int compareTo(Object obj) {
   if (obj == null) {
     return (1);
   } else if (obj instanceof CFGenKbISOCurrencyByCcyCdIdxKey) {
     CFGenKbISOCurrencyByCcyCdIdxKey rhs = (CFGenKbISOCurrencyByCcyCdIdxKey) obj;
     {
       int cmp = getRequiredISOCode().compareTo(rhs.getRequiredISOCode());
       if (cmp != 0) {
         return (cmp);
       }
     }
     return (0);
   } else if (obj instanceof CFGenKbISOCurrencyBuff) {
     CFGenKbISOCurrencyBuff rhs = (CFGenKbISOCurrencyBuff) obj;
     {
       int cmp = getRequiredISOCode().compareTo(rhs.getRequiredISOCode());
       if (cmp != 0) {
         return (cmp);
       }
     }
     return (0);
   } else {
     throw CFLib.getDefaultExceptionFactory()
         .newUnsupportedClassException(getClass(), "compareTo", "obj", obj, null);
   }
 }
 public boolean equals(Object obj) {
   if (obj == null) {
     return (false);
   } else if (obj instanceof CFGenKbISOCurrencyByCcyCdIdxKey) {
     CFGenKbISOCurrencyByCcyCdIdxKey rhs = (CFGenKbISOCurrencyByCcyCdIdxKey) obj;
     if (!getRequiredISOCode().equals(rhs.getRequiredISOCode())) {
       return (false);
     }
     return (true);
   } else if (obj instanceof CFGenKbISOCurrencyBuff) {
     CFGenKbISOCurrencyBuff rhs = (CFGenKbISOCurrencyBuff) obj;
     if (!getRequiredISOCode().equals(rhs.getRequiredISOCode())) {
       return (false);
     }
     return (true);
   } else {
     return (false);
   }
 }