public void minimizeMemory() { allTSecGroupMember = null; indexByTenantIdx = null; indexByGroupIdx = null; indexByUserIdx = null; indexByUUserIdx = null; List<ICFSecurityTSecGroupMemberObj> toForget = new LinkedList<ICFSecurityTSecGroupMemberObj>(); ICFSecurityTSecGroupMemberObj cur = null; Iterator<ICFSecurityTSecGroupMemberObj> 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 deleteTSecGroupMemberByIdIdx(long TenantId, long TSecGroupMemberId) { CFSecurityTSecGroupMemberPKey pkey = ((ICFCrmSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newPKey(); pkey.setRequiredTenantId(TenantId); pkey.setRequiredTSecGroupMemberId(TSecGroupMemberId); ICFSecurityTSecGroupMemberObj obj = readTSecGroupMember(pkey); if (obj != null) { ICFSecurityTSecGroupMemberEditObj editObj = (ICFSecurityTSecGroupMemberEditObj) obj.getEdit(); boolean editStarted; if (editObj == null) { editObj = (ICFSecurityTSecGroupMemberEditObj) 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); } }