public void forgetTSecGroupMemberByUserIdx(UUID SecUserId) { if (indexByUserIdx == null) { return; } CFSecurityTSecGroupMemberByUserIdxKey key = ((ICFBamSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newUserIdxKey(); key.setRequiredSecUserId(SecUserId); if (indexByUserIdx.containsKey(key)) { Map<CFSecurityTSecGroupMemberPKey, ICFSecurityTSecGroupMemberObj> mapUserIdx = indexByUserIdx.get(key); if (mapUserIdx != null) { List<ICFSecurityTSecGroupMemberObj> toForget = new LinkedList<ICFSecurityTSecGroupMemberObj>(); ICFSecurityTSecGroupMemberObj cur = null; Iterator<ICFSecurityTSecGroupMemberObj> iter = mapUserIdx.values().iterator(); while (iter.hasNext()) { cur = iter.next(); toForget.add(cur); } iter = toForget.iterator(); while (iter.hasNext()) { cur = iter.next(); cur.forget(true); } } indexByUserIdx.remove(key); } }
public ICFCrmMemoObj readMemoByUDescrIdx( long TenantId, long ContactId, String Description, boolean forceRead) { if (indexByUDescrIdx == null) { indexByUDescrIdx = new HashMap<CFCrmMemoByUDescrIdxKey, ICFCrmMemoObj>(); } CFCrmMemoByUDescrIdxKey key = ((ICFAccSchema) schema.getBackingStore()).getFactoryMemo().newUDescrIdxKey(); key.setRequiredTenantId(TenantId); key.setRequiredContactId(ContactId); key.setRequiredDescription(Description); ICFCrmMemoObj obj = null; if ((!forceRead) && indexByUDescrIdx.containsKey(key)) { obj = indexByUDescrIdx.get(key); } else { CFCrmMemoBuff buff = ((ICFAccSchema) schema.getBackingStore()) .getTableMemo() .readDerivedByUDescrIdx(schema.getAuthorization(), TenantId, ContactId, Description); if (buff != null) { obj = schema.getMemoTableObj().newInstance(); obj.setPKey(((ICFAccSchema) schema.getBackingStore()).getFactoryMemo().newPKey()); obj.setBuff(buff); obj = (ICFCrmMemoObj) obj.realize(); } else if (schema.getCacheMisses()) { indexByUDescrIdx.put(key, null); } } return (obj); }
public void deleteTSecGroupMemberByUUserIdx(long TenantId, int TSecGroupId, UUID SecUserId) { if (indexByUUserIdx == null) { indexByUUserIdx = new HashMap<CFSecurityTSecGroupMemberByUUserIdxKey, ICFSecurityTSecGroupMemberObj>(); } CFSecurityTSecGroupMemberByUUserIdxKey key = ((ICFBamSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newUUserIdxKey(); key.setRequiredTenantId(TenantId); key.setRequiredTSecGroupId(TSecGroupId); key.setRequiredSecUserId(SecUserId); ICFSecurityTSecGroupMemberObj obj = null; if (indexByUUserIdx.containsKey(key)) { obj = indexByUUserIdx.get(key); ((ICFBamSchema) schema.getBackingStore()) .getTableTSecGroupMember() .deleteTSecGroupMemberByUUserIdx( schema.getAuthorization(), TenantId, TSecGroupId, SecUserId); obj.forget(true); } else { ((ICFBamSchema) schema.getBackingStore()) .getTableTSecGroupMember() .deleteTSecGroupMemberByUUserIdx( schema.getAuthorization(), TenantId, TSecGroupId, SecUserId); } }
public ICFSecurityTSecGroupMemberObj readTSecGroupMember( CFSecurityTSecGroupMemberPKey pkey, boolean forceRead) { ICFSecurityTSecGroupMemberObj obj = null; if ((!forceRead) && members.containsKey(pkey)) { obj = members.get(pkey); } else { CFSecurityTSecGroupMemberBuff readBuff = ((ICFBamSchema) schema.getBackingStore()) .getTableTSecGroupMember() .readDerivedByIdIdx( schema.getAuthorization(), pkey.getRequiredTenantId(), pkey.getRequiredTSecGroupMemberId()); if (readBuff != null) { obj = schema.getTSecGroupMemberTableObj().newInstance(); obj.setPKey( ((ICFBamSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newPKey()); obj.setBuff(readBuff); obj = (ICFSecurityTSecGroupMemberObj) obj.realize(); } else if (schema.getCacheMisses()) { members.put(pkey, null); } } return (obj); }
public List<ICFCrmMemoObj> readAllMemo(boolean forceRead) { final String S_ProcName = "readAllMemo"; if ((allMemo == null) || forceRead) { Map<CFCrmMemoPKey, ICFCrmMemoObj> map = new HashMap<CFCrmMemoPKey, ICFCrmMemoObj>(); allMemo = map; CFCrmMemoBuff[] buffList = ((ICFAccSchema) schema.getBackingStore()) .getTableMemo() .readAllDerived(schema.getAuthorization()); CFCrmMemoBuff buff; ICFCrmMemoObj obj; for (int idx = 0; idx < buffList.length; idx++) { buff = buffList[idx]; obj = newInstance(); obj.setPKey(((ICFAccSchema) schema.getBackingStore()).getFactoryMemo().newPKey()); obj.setBuff(buff); ICFCrmMemoObj realized = (ICFCrmMemoObj) obj.realize(); } } Comparator<ICFCrmMemoObj> cmp = new Comparator<ICFCrmMemoObj>() { public int compare(ICFCrmMemoObj lhs, ICFCrmMemoObj rhs) { if (lhs == null) { if (rhs == null) { return (0); } else { return (-1); } } else if (rhs == null) { return (1); } else { CFCrmMemoPKey lhsPKey = lhs.getPKey(); CFCrmMemoPKey rhsPKey = rhs.getPKey(); int ret = lhsPKey.compareTo(rhsPKey); return (ret); } } }; int len = allMemo.size(); ICFCrmMemoObj arr[] = new ICFCrmMemoObj[len]; Iterator<ICFCrmMemoObj> valIter = allMemo.values().iterator(); int idx = 0; while ((idx < len) && valIter.hasNext()) { arr[idx++] = valIter.next(); } if (idx < len) { throw CFLib.getDefaultExceptionFactory() .newArgumentUnderflowException(getClass(), S_ProcName, 0, "idx", idx, len); } else if (valIter.hasNext()) { throw CFLib.getDefaultExceptionFactory() .newArgumentOverflowException(getClass(), S_ProcName, 0, "idx", idx, len); } Arrays.sort(arr, cmp); ArrayList<ICFCrmMemoObj> arrayList = new ArrayList<ICFCrmMemoObj>(len); for (idx = 0; idx < len; idx++) { arrayList.add(arr[idx]); } List<ICFCrmMemoObj> sortedList = arrayList; return (sortedList); }
public void forgetMemoByMemoContactIdx(long TenantId, long ContactId) { if (indexByMemoContactIdx == null) { return; } CFCrmMemoByMemoContactIdxKey key = ((ICFAccSchema) schema.getBackingStore()).getFactoryMemo().newMemoContactIdxKey(); key.setRequiredTenantId(TenantId); key.setRequiredContactId(ContactId); if (indexByMemoContactIdx.containsKey(key)) { Map<CFCrmMemoPKey, ICFCrmMemoObj> mapMemoContactIdx = indexByMemoContactIdx.get(key); if (mapMemoContactIdx != null) { List<ICFCrmMemoObj> toForget = new LinkedList<ICFCrmMemoObj>(); ICFCrmMemoObj cur = null; Iterator<ICFCrmMemoObj> iter = mapMemoContactIdx.values().iterator(); while (iter.hasNext()) { cur = iter.next(); toForget.add(cur); } iter = toForget.iterator(); while (iter.hasNext()) { cur = iter.next(); cur.forget(true); } } indexByMemoContactIdx.remove(key); } }
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 ICFSecurityISOCountryCurrencyObj readISOCountryCurrency( CFSecurityISOCountryCurrencyPKey pkey, boolean forceRead) { ICFSecurityISOCountryCurrencyObj obj = null; if ((!forceRead) && members.containsKey(pkey)) { obj = members.get(pkey); } else { CFSecurityISOCountryCurrencyBuff readBuff = ((ICFInternetSchema) schema.getBackingStore()) .getTableISOCountryCurrency() .readDerivedByIdIdx( schema.getAuthorization(), pkey.getRequiredISOCountryId(), pkey.getRequiredISOCurrencyId()); if (readBuff != null) { obj = schema.getISOCountryCurrencyTableObj().newInstance(); obj.setPKey( ((ICFInternetSchema) schema.getBackingStore()) .getFactoryISOCountryCurrency() .newPKey()); obj.setBuff(readBuff); obj = (ICFSecurityISOCountryCurrencyObj) obj.realize(); } else if (schema.getCacheMisses()) { members.put(pkey, null); } } return (obj); }
public CFSecuritySecGroupFormBuff[] readDerivedByFormIdx( CFSecurityAuthorization Authorization, long ClusterId, int SecFormId) { final String S_ProcName = "CFInternetRamSecGroupForm.readDerivedByFormIdx"; CFSecuritySecGroupFormByFormIdxKey key = schema.getFactorySecGroupForm().newFormIdxKey(); key.setRequiredClusterId(ClusterId); key.setRequiredSecFormId(SecFormId); CFSecuritySecGroupFormBuff[] recArray; if (dictByFormIdx.containsKey(key)) { Map<CFSecuritySecGroupFormPKey, CFSecuritySecGroupFormBuff> subdictFormIdx = dictByFormIdx.get(key); recArray = new CFSecuritySecGroupFormBuff[subdictFormIdx.size()]; Iterator<CFSecuritySecGroupFormBuff> iter = subdictFormIdx.values().iterator(); int idx = 0; while (iter.hasNext()) { recArray[idx++] = iter.next(); } } else { Map<CFSecuritySecGroupFormPKey, CFSecuritySecGroupFormBuff> subdictFormIdx = new HashMap<CFSecuritySecGroupFormPKey, CFSecuritySecGroupFormBuff>(); dictByFormIdx.put(key, subdictFormIdx); recArray = new CFSecuritySecGroupFormBuff[0]; } return (recArray); }
public ICFSecurityTSecGroupMemberObj readTSecGroupMemberByUUserIdx( long TenantId, int TSecGroupId, UUID SecUserId, boolean forceRead) { if (indexByUUserIdx == null) { indexByUUserIdx = new HashMap<CFSecurityTSecGroupMemberByUUserIdxKey, ICFSecurityTSecGroupMemberObj>(); } CFSecurityTSecGroupMemberByUUserIdxKey key = ((ICFBamSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newUUserIdxKey(); key.setRequiredTenantId(TenantId); key.setRequiredTSecGroupId(TSecGroupId); key.setRequiredSecUserId(SecUserId); ICFSecurityTSecGroupMemberObj obj = null; if ((!forceRead) && indexByUUserIdx.containsKey(key)) { obj = indexByUUserIdx.get(key); } else { CFSecurityTSecGroupMemberBuff buff = ((ICFBamSchema) schema.getBackingStore()) .getTableTSecGroupMember() .readDerivedByUUserIdx(schema.getAuthorization(), TenantId, TSecGroupId, SecUserId); if (buff != null) { obj = schema.getTSecGroupMemberTableObj().newInstance(); obj.setPKey( ((ICFBamSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newPKey()); obj.setBuff(buff); obj = (ICFSecurityTSecGroupMemberObj) obj.realize(); } else if (schema.getCacheMisses()) { indexByUUserIdx.put(key, null); } } return (obj); }
public void deleteMemoByMemoContactIdx(long TenantId, long ContactId) { CFCrmMemoByMemoContactIdxKey key = ((ICFAccSchema) schema.getBackingStore()).getFactoryMemo().newMemoContactIdxKey(); key.setRequiredTenantId(TenantId); key.setRequiredContactId(ContactId); if (indexByMemoContactIdx == null) { indexByMemoContactIdx = new HashMap<CFCrmMemoByMemoContactIdxKey, Map<CFCrmMemoPKey, ICFCrmMemoObj>>(); } if (indexByMemoContactIdx.containsKey(key)) { Map<CFCrmMemoPKey, ICFCrmMemoObj> dict = indexByMemoContactIdx.get(key); ((ICFAccSchema) schema.getBackingStore()) .getTableMemo() .deleteMemoByMemoContactIdx(schema.getAuthorization(), TenantId, ContactId); Iterator<ICFCrmMemoObj> iter = dict.values().iterator(); ICFCrmMemoObj obj; List<ICFCrmMemoObj> toForget = new LinkedList<ICFCrmMemoObj>(); while (iter.hasNext()) { obj = iter.next(); toForget.add(obj); } iter = toForget.iterator(); while (iter.hasNext()) { obj = iter.next(); obj.forget(true); } indexByMemoContactIdx.remove(key); } else { ((ICFAccSchema) schema.getBackingStore()) .getTableMemo() .deleteMemoByMemoContactIdx(schema.getAuthorization(), TenantId, ContactId); } }
public CFDbTestNumberDefBuff[] readAllDerived(CFSecurityAuthorization Authorization) { final String S_ProcName = "CFDbTestRamNumberDef.readAllDerived"; CFDbTestNumberDefBuff[] retList = new CFDbTestNumberDefBuff[dictByPKey.values().size()]; Iterator<CFDbTestNumberDefBuff> iter = dictByPKey.values().iterator(); int idx = 0; while (iter.hasNext()) { retList[idx++] = iter.next(); } return (retList); }
public CFSecurityHostNodeBuff lockDerived( CFSecurityAuthorization Authorization, CFSecurityHostNodePKey PKey) { final String S_ProcName = "CFAccRamHostNode.readDerived"; CFSecurityHostNodePKey key = schema.getFactoryHostNode().newPKey(); key.setRequiredClusterId(PKey.getRequiredClusterId()); key.setRequiredHostNodeId(PKey.getRequiredHostNodeId()); CFSecurityHostNodeBuff buff; if (dictByPKey.containsKey(key)) { buff = dictByPKey.get(key); } else { buff = null; } return (buff); }
public CFDbTestReqMinMaxValueBuff lockDerived( CFSecurityAuthorization Authorization, CFDbTestReqMinMaxValuePKey PKey) { final String S_ProcName = "CFDbTestRamReqMinMaxValue.readDerived"; CFDbTestReqMinMaxValuePKey key = schema.getFactoryReqMinMaxValue().newPKey(); key.setRequiredTenantId(PKey.getRequiredTenantId()); key.setRequiredId(PKey.getRequiredId()); CFDbTestReqMinMaxValueBuff buff; if (dictByPKey.containsKey(key)) { buff = dictByPKey.get(key); } else { buff = null; } return (buff); }
public void forgetMemoByIdIdx(long TenantId, long MemoId) { if (members == null) { return; } CFCrmMemoPKey key = ((ICFAccSchema) schema.getBackingStore()).getFactoryMemo().newPKey(); key.setRequiredTenantId(TenantId); key.setRequiredMemoId(MemoId); if (members.containsKey(key)) { ICFCrmMemoObj probed = members.get(key); if (probed != null) { probed.forget(true); } } }
public CFSecuritySecGroupFormBuff lockDerived( CFSecurityAuthorization Authorization, CFSecuritySecGroupFormPKey PKey) { final String S_ProcName = "CFInternetRamSecGroupForm.readDerived"; CFSecuritySecGroupFormPKey key = schema.getFactorySecGroupForm().newPKey(); key.setRequiredClusterId(PKey.getRequiredClusterId()); key.setRequiredSecGroupFormId(PKey.getRequiredSecGroupFormId()); CFSecuritySecGroupFormBuff buff; if (dictByPKey.containsKey(key)) { buff = dictByPKey.get(key); } else { buff = null; } return (buff); }
public void deleteSecGroupForm( CFSecurityAuthorization Authorization, CFSecuritySecGroupFormBuff Buff) { final String S_ProcName = "CFInternetRamSecGroupFormTable.deleteSecGroupForm() "; CFSecuritySecGroupFormPKey pkey = schema.getFactorySecGroupForm().newPKey(); pkey.setRequiredClusterId(Buff.getRequiredClusterId()); pkey.setRequiredSecGroupFormId(Buff.getRequiredSecGroupFormId()); CFSecuritySecGroupFormBuff existing = dictByPKey.get(pkey); if (existing == null) { return; } if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory() .newCollisionDetectedException(getClass(), "deleteSecGroupForm", pkey); } CFSecuritySecGroupFormByClusterIdxKey keyClusterIdx = schema.getFactorySecGroupForm().newClusterIdxKey(); keyClusterIdx.setRequiredClusterId(existing.getRequiredClusterId()); CFSecuritySecGroupFormByGroupIdxKey keyGroupIdx = schema.getFactorySecGroupForm().newGroupIdxKey(); keyGroupIdx.setRequiredClusterId(existing.getRequiredClusterId()); keyGroupIdx.setRequiredSecGroupId(existing.getRequiredSecGroupId()); CFSecuritySecGroupFormByAppIdxKey keyAppIdx = schema.getFactorySecGroupForm().newAppIdxKey(); keyAppIdx.setRequiredClusterId(existing.getRequiredClusterId()); keyAppIdx.setRequiredSecAppId(existing.getRequiredSecAppId()); CFSecuritySecGroupFormByFormIdxKey keyFormIdx = schema.getFactorySecGroupForm().newFormIdxKey(); keyFormIdx.setRequiredClusterId(existing.getRequiredClusterId()); keyFormIdx.setRequiredSecFormId(existing.getRequiredSecFormId()); CFSecuritySecGroupFormByUFormIdxKey keyUFormIdx = schema.getFactorySecGroupForm().newUFormIdxKey(); keyUFormIdx.setRequiredClusterId(existing.getRequiredClusterId()); keyUFormIdx.setRequiredSecGroupId(existing.getRequiredSecGroupId()); keyUFormIdx.setRequiredSecFormId(existing.getRequiredSecFormId()); // Validate reverse foreign keys // Delete is valid Map<CFSecuritySecGroupFormPKey, CFSecuritySecGroupFormBuff> subdict; dictByPKey.remove(pkey); subdict = dictByClusterIdx.get(keyClusterIdx); subdict.remove(pkey); subdict = dictByGroupIdx.get(keyGroupIdx); subdict.remove(pkey); subdict = dictByAppIdx.get(keyAppIdx); subdict.remove(pkey); subdict = dictByFormIdx.get(keyFormIdx); subdict.remove(pkey); dictByUFormIdx.remove(keyUFormIdx); }
public CFSecurityHostNodeBuff readDerivedByHostNameIdx( CFSecurityAuthorization Authorization, long ClusterId, String HostName) { final String S_ProcName = "CFAccRamHostNode.readDerivedByHostNameIdx"; CFSecurityHostNodeByHostNameIdxKey key = schema.getFactoryHostNode().newHostNameIdxKey(); key.setRequiredClusterId(ClusterId); key.setRequiredHostName(HostName); CFSecurityHostNodeBuff buff; if (dictByHostNameIdx.containsKey(key)) { buff = dictByHostNameIdx.get(key); } else { buff = null; } return (buff); }
public void forgetTSecGroupMemberByIdIdx(long TenantId, long TSecGroupMemberId) { if (members == null) { return; } CFSecurityTSecGroupMemberPKey key = ((ICFBamSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newPKey(); key.setRequiredTenantId(TenantId); key.setRequiredTSecGroupMemberId(TSecGroupMemberId); if (members.containsKey(key)) { ICFSecurityTSecGroupMemberObj probed = members.get(key); if (probed != null) { probed.forget(true); } } }
public CFDbTestNumberDefBuff readDerivedByIdIdx( CFSecurityAuthorization Authorization, long TenantId, long Id) { final String S_ProcName = "CFDbTestRamValue.readDerivedByIdIdx() "; CFDbTestValuePKey key = schema.getFactoryValue().newPKey(); key.setRequiredTenantId(TenantId); key.setRequiredId(Id); CFDbTestNumberDefBuff buff; if (dictByPKey.containsKey(key)) { buff = dictByPKey.get(key); } else { buff = null; } return (buff); }
public CFDbTestReqMinMaxValueBuff readDerivedByUDescrIdx( CFSecurityAuthorization Authorization, long TenantId, String Description) { final String S_ProcName = "CFDbTestRamReqMinMaxValue.readDerivedByUDescrIdx"; CFDbTestReqMinMaxValueByUDescrIdxKey key = schema.getFactoryReqMinMaxValue().newUDescrIdxKey(); key.setRequiredTenantId(TenantId); key.setRequiredDescription(Description); CFDbTestReqMinMaxValueBuff buff; if (dictByUDescrIdx.containsKey(key)) { buff = dictByUDescrIdx.get(key); } else { buff = null; } return (buff); }
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 deleteNumberDefByNextIdx( CFSecurityAuthorization Authorization, CFDbTestValueByNextIdxKey argKey) { final String S_ProcName = "deleteNumberDefByNextIdx"; CFDbTestNumberDefBuff cur; LinkedList<CFDbTestNumberDefBuff> matchSet = new LinkedList<CFDbTestNumberDefBuff>(); Iterator<CFDbTestNumberDefBuff> values = dictByPKey.values().iterator(); while (values.hasNext()) { cur = values.next(); if (argKey.equals(cur)) { matchSet.add(cur); } } Iterator<CFDbTestNumberDefBuff> iterMatch = matchSet.iterator(); while (iterMatch.hasNext()) { cur = iterMatch.next(); String subClassCode = cur.getClassCode(); if ("NUMD".equals(subClassCode)) { schema.getTableNumberDef().deleteNumberDef(Authorization, cur); } else if ("NUMC".equals(subClassCode)) { schema.getTableNumberCol().deleteNumberCol(Authorization, (CFDbTestNumberColBuff) cur); } else if ("NUMT".equals(subClassCode)) { schema.getTableNumberType().deleteNumberType(Authorization, (CFDbTestNumberTypeBuff) cur); } else { throw CFLib.getDefaultExceptionFactory() .newUnsupportedClassException( getClass(), S_ProcName, "subClassCode", cur, "Instance of or subclass of NumberDef must not be \"" + subClassCode + "\""); } } }
public CFSecuritySecGroupFormBuff readDerivedByUFormIdx( CFSecurityAuthorization Authorization, long ClusterId, int SecGroupId, int SecFormId) { final String S_ProcName = "CFInternetRamSecGroupForm.readDerivedByUFormIdx"; CFSecuritySecGroupFormByUFormIdxKey key = schema.getFactorySecGroupForm().newUFormIdxKey(); key.setRequiredClusterId(ClusterId); key.setRequiredSecGroupId(SecGroupId); key.setRequiredSecFormId(SecFormId); CFSecuritySecGroupFormBuff buff; if (dictByUFormIdx.containsKey(key)) { buff = dictByUFormIdx.get(key); } else { buff = null; } return (buff); }
public CFSecurityCursor openHostNodeCursorByClusterIdx( CFSecurityAuthorization Authorization, long ClusterId) { CFSecurityCursor cursor; CFSecurityHostNodeByClusterIdxKey key = schema.getFactoryHostNode().newClusterIdxKey(); key.setRequiredClusterId(ClusterId); if (dictByClusterIdx.containsKey(key)) { Map<CFSecurityHostNodePKey, CFSecurityHostNodeBuff> subdictClusterIdx = dictByClusterIdx.get(key); cursor = new CFAccRamHostNodeCursor(Authorization, schema, subdictClusterIdx.values()); } else { cursor = new CFAccRamHostNodeCursor( Authorization, schema, new ArrayList<CFSecurityHostNodeBuff>()); } return (cursor); }
public CFSecurityCursor openSecGroupFormCursorByFormIdx( CFSecurityAuthorization Authorization, long ClusterId, int SecFormId) { CFSecurityCursor cursor; CFSecuritySecGroupFormByFormIdxKey key = schema.getFactorySecGroupForm().newFormIdxKey(); key.setRequiredClusterId(ClusterId); key.setRequiredSecFormId(SecFormId); if (dictByFormIdx.containsKey(key)) { Map<CFSecuritySecGroupFormPKey, CFSecuritySecGroupFormBuff> subdictFormIdx = dictByFormIdx.get(key); cursor = new CFInternetRamSecGroupFormCursor(Authorization, schema, subdictFormIdx.values()); } else { cursor = new CFInternetRamSecGroupFormCursor( Authorization, schema, new ArrayList<CFSecuritySecGroupFormBuff>()); } return (cursor); }
public void forgetMemoByUDescrIdx(long TenantId, long ContactId, String Description) { if (indexByUDescrIdx == null) { return; } CFCrmMemoByUDescrIdxKey key = ((ICFAccSchema) schema.getBackingStore()).getFactoryMemo().newUDescrIdxKey(); key.setRequiredTenantId(TenantId); key.setRequiredContactId(ContactId); key.setRequiredDescription(Description); if (indexByUDescrIdx.containsKey(key)) { ICFCrmMemoObj probed = indexByUDescrIdx.get(key); if (probed != null) { probed.forget(true); } indexByUDescrIdx.remove(key); } }
public CFSecurityCursor openReqMinMaxValueCursorByTenantIdx( CFSecurityAuthorization Authorization, long TenantId) { CFSecurityCursor cursor; CFDbTestReqMinMaxValueByTenantIdxKey key = schema.getFactoryReqMinMaxValue().newTenantIdxKey(); key.setRequiredTenantId(TenantId); if (dictByTenantIdx.containsKey(key)) { Map<CFDbTestReqMinMaxValuePKey, CFDbTestReqMinMaxValueBuff> subdictTenantIdx = dictByTenantIdx.get(key); cursor = new CFDbTestRamReqMinMaxValueCursor(Authorization, schema, subdictTenantIdx.values()); } else { cursor = new CFDbTestRamReqMinMaxValueCursor( Authorization, schema, new ArrayList<CFDbTestReqMinMaxValueBuff>()); } return (cursor); }
public void forgetTSecGroupMemberByUUserIdx(long TenantId, int TSecGroupId, UUID SecUserId) { if (indexByUUserIdx == null) { return; } CFSecurityTSecGroupMemberByUUserIdxKey key = ((ICFBamSchema) schema.getBackingStore()).getFactoryTSecGroupMember().newUUserIdxKey(); key.setRequiredTenantId(TenantId); key.setRequiredTSecGroupId(TSecGroupId); key.setRequiredSecUserId(SecUserId); if (indexByUUserIdx.containsKey(key)) { ICFSecurityTSecGroupMemberObj probed = indexByUUserIdx.get(key); if (probed != null) { probed.forget(true); } indexByUUserIdx.remove(key); } }
public void deleteNumberDef(CFSecurityAuthorization Authorization, CFDbTestNumberDefBuff Buff) { final String S_ProcName = "CFDbTestRamNumberDefTable.deleteNumberDef() "; CFDbTestValuePKey pkey = schema.getFactoryValue().newPKey(); pkey.setRequiredTenantId(Buff.getRequiredTenantId()); pkey.setRequiredId(Buff.getRequiredId()); CFDbTestNumberDefBuff existing = dictByPKey.get(pkey); if (existing == null) { return; } if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory() .newCollisionDetectedException(getClass(), "deleteNumberDef", pkey); } // Validate reverse foreign keys if (schema .getTableNumberCol() .readDerivedByIdIdx( Authorization, existing.getRequiredTenantId(), existing.getRequiredId()) != null) { throw CFLib.getDefaultExceptionFactory() .newDependentsDetectedException( getClass(), "deleteNumberDef", "Superclass", "SuperClass", "NumberCol", pkey); } if (schema .getTableNumberType() .readDerivedByIdIdx( Authorization, existing.getRequiredTenantId(), existing.getRequiredId()) != null) { throw CFLib.getDefaultExceptionFactory() .newDependentsDetectedException( getClass(), "deleteNumberDef", "Superclass", "SuperClass", "NumberType", pkey); } // Delete is valid Map<CFDbTestValuePKey, CFDbTestNumberDefBuff> subdict; dictByPKey.remove(pkey); schema.getTableAtom().deleteAtom(Authorization, Buff); }