public ICFSecurityISOCountryObj readISOCountryByISOCodeIdx(String ISOCode, boolean forceRead) {
   if (indexByISOCodeIdx == null) {
     indexByISOCodeIdx =
         new HashMap<CFSecurityISOCountryByISOCodeIdxKey, ICFSecurityISOCountryObj>();
   }
   CFSecurityISOCountryByISOCodeIdxKey key =
       ((ICFInternetSchema) schema.getBackingStore()).getFactoryISOCountry().newISOCodeIdxKey();
   key.setRequiredISOCode(ISOCode);
   ICFSecurityISOCountryObj obj = null;
   if ((!forceRead) && indexByISOCodeIdx.containsKey(key)) {
     obj = indexByISOCodeIdx.get(key);
   } else {
     CFSecurityISOCountryBuff buff =
         ((ICFInternetSchema) schema.getBackingStore())
             .getTableISOCountry()
             .readDerivedByISOCodeIdx(schema.getAuthorization(), ISOCode);
     if (buff != null) {
       obj = schema.getISOCountryTableObj().newInstance();
       obj.setPKey(
           ((ICFInternetSchema) schema.getBackingStore()).getFactoryISOCountry().newPKey());
       obj.setBuff(buff);
       obj = (ICFSecurityISOCountryObj) obj.realize();
     } else if (schema.getCacheMisses()) {
       indexByISOCodeIdx.put(key, null);
     }
   }
   return (obj);
 }
  public void forgetISOCountryByISOCodeIdx(String ISOCode) {
    if (indexByISOCodeIdx == null) {
      return;
    }
    CFSecurityISOCountryByISOCodeIdxKey key =
        ((ICFInternetSchema) schema.getBackingStore()).getFactoryISOCountry().newISOCodeIdxKey();
    key.setRequiredISOCode(ISOCode);
    if (indexByISOCodeIdx.containsKey(key)) {
      ICFSecurityISOCountryObj probed = indexByISOCodeIdx.get(key);
      if (probed != null) {
        probed.forget(true);
      }

      indexByISOCodeIdx.remove(key);
    }
  }
 public void deleteISOCountryByISOCodeIdx(String ISOCode) {
   if (indexByISOCodeIdx == null) {
     indexByISOCodeIdx =
         new HashMap<CFSecurityISOCountryByISOCodeIdxKey, ICFSecurityISOCountryObj>();
   }
   CFSecurityISOCountryByISOCodeIdxKey key =
       ((ICFInternetSchema) schema.getBackingStore()).getFactoryISOCountry().newISOCodeIdxKey();
   key.setRequiredISOCode(ISOCode);
   ICFSecurityISOCountryObj obj = null;
   if (indexByISOCodeIdx.containsKey(key)) {
     obj = indexByISOCodeIdx.get(key);
     ((ICFInternetSchema) schema.getBackingStore())
         .getTableISOCountry()
         .deleteISOCountryByISOCodeIdx(schema.getAuthorization(), ISOCode);
     obj.forget(true);
   } else {
     ((ICFInternetSchema) schema.getBackingStore())
         .getTableISOCountry()
         .deleteISOCountryByISOCodeIdx(schema.getAuthorization(), ISOCode);
   }
 }
  public void forgetISOCountry(ICFSecurityISOCountryObj Obj, boolean forgetSubObjects) {
    ICFSecurityISOCountryObj obj = Obj;
    CFSecurityISOCountryPKey pkey = obj.getPKey();
    if (members.containsKey(pkey)) {
      ICFSecurityISOCountryObj keepObj = members.get(pkey);
      // Detach object from alternate, duplicate, all and PKey indexes

      if (indexByISOCodeIdx != null) {
        CFSecurityISOCountryByISOCodeIdxKey keyISOCodeIdx =
            ((ICFInternetSchema) schema.getBackingStore())
                .getFactoryISOCountry()
                .newISOCodeIdxKey();
        keyISOCodeIdx.setRequiredISOCode(keepObj.getRequiredISOCode());
        indexByISOCodeIdx.remove(keyISOCodeIdx);
      }

      if (indexByNameIdx != null) {
        CFSecurityISOCountryByNameIdxKey keyNameIdx =
            ((ICFInternetSchema) schema.getBackingStore()).getFactoryISOCountry().newNameIdxKey();
        keyNameIdx.setRequiredName(keepObj.getRequiredName());
        indexByNameIdx.remove(keyNameIdx);
      }

      if (allISOCountry != null) {
        allISOCountry.remove(keepObj.getPKey());
      }
      members.remove(pkey);
      if (forgetSubObjects) {
        ((ICFSecuritySchemaObj) schema)
            .getISOCountryCurrencyTableObj()
            .forgetISOCountryCurrencyByCountryIdx(keepObj.getRequiredId());
        ((ICFSecuritySchemaObj) schema)
            .getISOCountryLanguageTableObj()
            .forgetISOCountryLanguageByCountryIdx(keepObj.getRequiredId());
      }
    }
  }
  public ICFSecurityISOCountryObj realizeISOCountry(ICFSecurityISOCountryObj Obj) {
    ICFSecurityISOCountryObj obj = Obj;
    CFSecurityISOCountryPKey pkey = obj.getPKey();
    ICFSecurityISOCountryObj keepObj = null;
    if (members.containsKey(pkey) && (null != members.get(pkey))) {
      ICFSecurityISOCountryObj existingObj = members.get(pkey);
      keepObj = existingObj;

      /*
       *	We always rebind the data because if we're being called, some index has
       *	been updated and is refreshing it's data, which may or may not have changed
       */

      // Detach object from alternate and duplicate indexes, leave PKey alone

      if (indexByISOCodeIdx != null) {
        CFSecurityISOCountryByISOCodeIdxKey keyISOCodeIdx =
            ((ICFInternetSchema) schema.getBackingStore())
                .getFactoryISOCountry()
                .newISOCodeIdxKey();
        keyISOCodeIdx.setRequiredISOCode(keepObj.getRequiredISOCode());
        indexByISOCodeIdx.remove(keyISOCodeIdx);
      }

      if (indexByNameIdx != null) {
        CFSecurityISOCountryByNameIdxKey keyNameIdx =
            ((ICFInternetSchema) schema.getBackingStore()).getFactoryISOCountry().newNameIdxKey();
        keyNameIdx.setRequiredName(keepObj.getRequiredName());
        indexByNameIdx.remove(keyNameIdx);
      }

      keepObj.setBuff(Obj.getBuff());
      // Attach new object to alternate and duplicate indexes -- PKey stay stable

      if (indexByISOCodeIdx != null) {
        CFSecurityISOCountryByISOCodeIdxKey keyISOCodeIdx =
            ((ICFInternetSchema) schema.getBackingStore())
                .getFactoryISOCountry()
                .newISOCodeIdxKey();
        keyISOCodeIdx.setRequiredISOCode(keepObj.getRequiredISOCode());
        indexByISOCodeIdx.put(keyISOCodeIdx, keepObj);
      }

      if (indexByNameIdx != null) {
        CFSecurityISOCountryByNameIdxKey keyNameIdx =
            ((ICFInternetSchema) schema.getBackingStore()).getFactoryISOCountry().newNameIdxKey();
        keyNameIdx.setRequiredName(keepObj.getRequiredName());
        indexByNameIdx.put(keyNameIdx, keepObj);
      }
      if (allISOCountry != null) {
        allISOCountry.put(keepObj.getPKey(), keepObj);
      }
    } else {
      keepObj = obj;
      keepObj.setIsNew(false);
      // Attach new object to PKey, all, alternate, and duplicate indexes
      members.put(keepObj.getPKey(), keepObj);
      if (allISOCountry != null) {
        allISOCountry.put(keepObj.getPKey(), keepObj);
      }

      if (indexByISOCodeIdx != null) {
        CFSecurityISOCountryByISOCodeIdxKey keyISOCodeIdx =
            ((ICFInternetSchema) schema.getBackingStore())
                .getFactoryISOCountry()
                .newISOCodeIdxKey();
        keyISOCodeIdx.setRequiredISOCode(keepObj.getRequiredISOCode());
        indexByISOCodeIdx.put(keyISOCodeIdx, keepObj);
      }

      if (indexByNameIdx != null) {
        CFSecurityISOCountryByNameIdxKey keyNameIdx =
            ((ICFInternetSchema) schema.getBackingStore()).getFactoryISOCountry().newNameIdxKey();
        keyNameIdx.setRequiredName(keepObj.getRequiredName());
        indexByNameIdx.put(keyNameIdx, keepObj);
      }
    }
    return (keepObj);
  }