public void deleteISOCountryByIdIdx(short Id) { CFSecurityISOCountryPKey pkey = ((ICFInternetSchema) schema.getBackingStore()).getFactoryISOCountry().newPKey(); pkey.setRequiredId(Id); ICFSecurityISOCountryObj obj = readISOCountry(pkey); if (obj != null) { ICFSecurityISOCountryEditObj editObj = (ICFSecurityISOCountryEditObj) obj.getEdit(); boolean editStarted; if (editObj == null) { editObj = (ICFSecurityISOCountryEditObj) obj.beginEdit(); if (editObj != null) { editStarted = true; } else { editStarted = false; } } else { editStarted = false; } if (editObj != null) { editObj.delete(); if (editStarted) { editObj.endEdit(); } } obj.forget(true); } }
public void minimizeMemory() { allISOCountry = null; indexByISOCodeIdx = null; indexByNameIdx = null; List<ICFSecurityISOCountryObj> toForget = new LinkedList<ICFSecurityISOCountryObj>(); ICFSecurityISOCountryObj cur = null; Iterator<ICFSecurityISOCountryObj> iter = members.values().iterator(); while (iter.hasNext()) { cur = iter.next(); if (cur.getEdit() == null) { toForget.add(cur); } } iter = toForget.iterator(); while (iter.hasNext()) { cur = iter.next(); cur.forget(); } }