public void deleteISOCountryCurrencyByIdIdx(short ISOCountryId, short ISOCurrencyId) { CFSecurityISOCountryCurrencyPKey pkey = ((ICFInternetSchema) schema.getBackingStore()).getFactoryISOCountryCurrency().newPKey(); pkey.setRequiredISOCountryId(ISOCountryId); pkey.setRequiredISOCurrencyId(ISOCurrencyId); ICFSecurityISOCountryCurrencyObj obj = readISOCountryCurrency(pkey); if (obj != null) { ICFSecurityISOCountryCurrencyEditObj editObj = (ICFSecurityISOCountryCurrencyEditObj) obj.getEdit(); boolean editStarted; if (editObj == null) { editObj = (ICFSecurityISOCountryCurrencyEditObj) 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 deleteISOCountryCurrency(ICFSecurityISOCountryCurrencyObj Obj) { ICFSecurityISOCountryCurrencyObj obj = Obj; ((ICFInternetSchema) schema.getBackingStore()) .getTableISOCountryCurrency() .deleteISOCountryCurrency(schema.getAuthorization(), obj.getISOCountryCurrencyBuff()); obj.forget(true); }
public void forgetISOCountryCurrencyByCurrencyIdx(short ISOCurrencyId) { if (indexByCurrencyIdx == null) { return; } CFSecurityISOCountryCurrencyByCurrencyIdxKey key = ((ICFInternetSchema) schema.getBackingStore()) .getFactoryISOCountryCurrency() .newCurrencyIdxKey(); key.setRequiredISOCurrencyId(ISOCurrencyId); if (indexByCurrencyIdx.containsKey(key)) { Map<CFSecurityISOCountryCurrencyPKey, ICFSecurityISOCountryCurrencyObj> mapCurrencyIdx = indexByCurrencyIdx.get(key); if (mapCurrencyIdx != null) { List<ICFSecurityISOCountryCurrencyObj> toForget = new LinkedList<ICFSecurityISOCountryCurrencyObj>(); ICFSecurityISOCountryCurrencyObj cur = null; Iterator<ICFSecurityISOCountryCurrencyObj> iter = mapCurrencyIdx.values().iterator(); while (iter.hasNext()) { cur = iter.next(); toForget.add(cur); } iter = toForget.iterator(); while (iter.hasNext()) { cur = iter.next(); cur.forget(true); } } indexByCurrencyIdx.remove(key); } }
public void forgetISOCountryCurrencyByIdIdx(short ISOCountryId, short ISOCurrencyId) { if (members == null) { return; } CFSecurityISOCountryCurrencyPKey key = ((ICFInternetSchema) schema.getBackingStore()).getFactoryISOCountryCurrency().newPKey(); key.setRequiredISOCountryId(ISOCountryId); key.setRequiredISOCurrencyId(ISOCurrencyId); if (members.containsKey(key)) { ICFSecurityISOCountryCurrencyObj probed = members.get(key); if (probed != null) { probed.forget(true); } } }
public void minimizeMemory() { allISOCountryCurrency = null; indexByCountryIdx = null; indexByCurrencyIdx = null; List<ICFSecurityISOCountryCurrencyObj> toForget = new LinkedList<ICFSecurityISOCountryCurrencyObj>(); ICFSecurityISOCountryCurrencyObj cur = null; Iterator<ICFSecurityISOCountryCurrencyObj> 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(); } }
public void deleteISOCountryCurrencyByCurrencyIdx(short ISOCurrencyId) { CFSecurityISOCountryCurrencyByCurrencyIdxKey key = ((ICFInternetSchema) schema.getBackingStore()) .getFactoryISOCountryCurrency() .newCurrencyIdxKey(); key.setRequiredISOCurrencyId(ISOCurrencyId); if (indexByCurrencyIdx == null) { indexByCurrencyIdx = new HashMap< CFSecurityISOCountryCurrencyByCurrencyIdxKey, Map<CFSecurityISOCountryCurrencyPKey, ICFSecurityISOCountryCurrencyObj>>(); } if (indexByCurrencyIdx.containsKey(key)) { Map<CFSecurityISOCountryCurrencyPKey, ICFSecurityISOCountryCurrencyObj> dict = indexByCurrencyIdx.get(key); ((ICFInternetSchema) schema.getBackingStore()) .getTableISOCountryCurrency() .deleteISOCountryCurrencyByCurrencyIdx(schema.getAuthorization(), ISOCurrencyId); Iterator<ICFSecurityISOCountryCurrencyObj> iter = dict.values().iterator(); ICFSecurityISOCountryCurrencyObj obj; List<ICFSecurityISOCountryCurrencyObj> toForget = new LinkedList<ICFSecurityISOCountryCurrencyObj>(); while (iter.hasNext()) { obj = iter.next(); toForget.add(obj); } iter = toForget.iterator(); while (iter.hasNext()) { obj = iter.next(); obj.forget(true); } indexByCurrencyIdx.remove(key); } else { ((ICFInternetSchema) schema.getBackingStore()) .getTableISOCountryCurrency() .deleteISOCountryCurrencyByCurrencyIdx(schema.getAuthorization(), ISOCurrencyId); } }