public Object getValueAt(int row, int column) { if ((row < 0) || (column < -1)) { return (null); } if (arrayOfISOCountry == null) { return (null); } int len = arrayOfISOCountry.length; if (row >= len) { return (null); } ICFSecurityISOCountryObj obj = arrayOfISOCountry[row]; if (obj == null) { return (null); } Object retval; switch (column) { case COLID_ROW_HEADER: retval = obj; break; case COLID_OBJQUALIFIEDNAME: retval = obj.getObjQualifiedName(); break; case COLID_ID: retval = new Short(obj.getRequiredId()); break; case COLID_ISOCODE: retval = obj.getRequiredISOCode(); if (retval == null) { retval = ""; } break; case COLID_NAME: retval = obj.getRequiredName(); if (retval == null) { retval = ""; } break; default: retval = null; break; } return (retval); }
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); }