List of usage examples for java.util SortedMap remove
V remove(Object key);
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstRam.CFAstRamDomainBaseTable.java
public void deleteDomainBase(CFAstAuthorization Authorization, CFAstDomainBaseBuff Buff) { final String S_ProcName = "CFAstRamDomainBaseTable.deleteDomainBase() "; CFAstDomainBasePKey pkey = schema.getFactoryDomainBase().newPKey(); pkey.setClassCode(Buff.getClassCode()); pkey.setRequiredTenantId(Buff.getRequiredTenantId()); pkey.setRequiredId(Buff.getRequiredId()); CFAstDomainBaseBuff existing = dictByPKey.get(pkey); if (existing == null) { return;/* w ww .ja v a2s . c o m*/ } if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteDomainBase", pkey); } CFAstDomainBaseByTenantIdxKey keyTenantIdx = schema.getFactoryDomainBase().newTenantIdxKey(); keyTenantIdx.setRequiredTenantId(existing.getRequiredTenantId()); // Validate reverse foreign keys if (schema.getTableTopDomain().readDerivedByIdIdx(Authorization, existing.getRequiredTenantId(), existing.getRequiredId()) != null) { throw CFLib.getDefaultExceptionFactory().newDependentsDetectedException(getClass(), "deleteDomainBase", "Superclass", "SuperClass", "TopDomain", pkey); } if (schema.getTableDomain().readDerivedByIdIdx(Authorization, existing.getRequiredTenantId(), existing.getRequiredId()) != null) { throw CFLib.getDefaultExceptionFactory().newDependentsDetectedException(getClass(), "deleteDomainBase", "Superclass", "SuperClass", "Domain", pkey); } if (schema.getTableProjectBase().readDerivedByIdIdx(Authorization, existing.getRequiredTenantId(), existing.getRequiredId()) != null) { throw CFLib.getDefaultExceptionFactory().newDependentsDetectedException(getClass(), "deleteDomainBase", "Superclass", "SuperClass", "ProjectBase", pkey); } // Delete is valid SortedMap<CFAstDomainBasePKey, CFAstDomainBaseBuff> subdict; dictByPKey.remove(pkey); subdict = dictByTenantIdx.get(keyTenantIdx); subdict.remove(pkey); }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstRam.CFAstRamSecAppTable.java
public void deleteSecApp(CFAstAuthorization Authorization, CFAstSecAppBuff Buff) { final String S_ProcName = "CFAstRamSecAppTable.deleteSecApp() "; CFAstSecAppPKey pkey = schema.getFactorySecApp().newPKey(); pkey.setRequiredClusterId(Buff.getRequiredClusterId()); pkey.setRequiredSecAppId(Buff.getRequiredSecAppId()); CFAstSecAppBuff existing = dictByPKey.get(pkey); if (existing == null) { return;//from w w w . java2 s. c o m } if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteSecApp", pkey); } CFAstSecAppByClusterIdxKey keyClusterIdx = schema.getFactorySecApp().newClusterIdxKey(); keyClusterIdx.setRequiredClusterId(existing.getRequiredClusterId()); CFAstSecAppByUJEEMountIdxKey keyUJEEMountIdx = schema.getFactorySecApp().newUJEEMountIdxKey(); keyUJEEMountIdx.setRequiredClusterId(existing.getRequiredClusterId()); keyUJEEMountIdx.setRequiredJEEMountName(existing.getRequiredJEEMountName()); // Validate reverse foreign keys // Delete is valid schema.getTableSecForm().deleteSecFormBySecAppIdx(Authorization, Buff.getRequiredClusterId(), Buff.getRequiredSecAppId()); SortedMap<CFAstSecAppPKey, CFAstSecAppBuff> subdict; dictByPKey.remove(pkey); subdict = dictByClusterIdx.get(keyClusterIdx); subdict.remove(pkey); dictByUJEEMountIdx.remove(keyUJEEMountIdx); }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccRam.CFAccRamTSecGroupTable.java
public void deleteTSecGroup(CFAccAuthorization Authorization, CFAccTSecGroupBuff Buff) { final String S_ProcName = "CFAccRamTSecGroupTable.deleteTSecGroup() "; CFAccTSecGroupPKey pkey = schema.getFactoryTSecGroup().newPKey(); pkey.setRequiredTenantId(Buff.getRequiredTenantId()); pkey.setRequiredTSecGroupId(Buff.getRequiredTSecGroupId()); CFAccTSecGroupBuff existing = dictByPKey.get(pkey); if (existing == null) { return;// w w w . j a v a 2s .co m } if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteTSecGroup", pkey); } CFAccTSecGroupByTenantIdxKey keyTenantIdx = schema.getFactoryTSecGroup().newTenantIdxKey(); keyTenantIdx.setRequiredTenantId(existing.getRequiredTenantId()); CFAccTSecGroupByUNameIdxKey keyUNameIdx = schema.getFactoryTSecGroup().newUNameIdxKey(); keyUNameIdx.setRequiredTenantId(existing.getRequiredTenantId()); keyUNameIdx.setRequiredName(existing.getRequiredName()); // Validate reverse foreign keys // Delete is valid schema.getTableTSecGroupInclude().deleteTSecGroupIncludeByGroupIdx(Authorization, Buff.getRequiredTenantId(), Buff.getRequiredTSecGroupId()); schema.getTableTSecGroupMember().deleteTSecGroupMemberByGroupIdx(Authorization, Buff.getRequiredTenantId(), Buff.getRequiredTSecGroupId()); schema.getTableTSecGroupInclude().deleteTSecGroupIncludeByIncludeIdx(Authorization, Buff.getRequiredTenantId(), Buff.getRequiredTSecGroupId()); SortedMap<CFAccTSecGroupPKey, CFAccTSecGroupBuff> subdict; dictByPKey.remove(pkey); subdict = dictByTenantIdx.get(keyTenantIdx); subdict.remove(pkey); dictByUNameIdx.remove(keyUNameIdx); }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstRam.CFAstRamTSecGroupTable.java
public void deleteTSecGroup(CFAstAuthorization Authorization, CFAstTSecGroupBuff Buff) { final String S_ProcName = "CFAstRamTSecGroupTable.deleteTSecGroup() "; CFAstTSecGroupPKey pkey = schema.getFactoryTSecGroup().newPKey(); pkey.setRequiredTenantId(Buff.getRequiredTenantId()); pkey.setRequiredTSecGroupId(Buff.getRequiredTSecGroupId()); CFAstTSecGroupBuff existing = dictByPKey.get(pkey); if (existing == null) { return;//from www. j av a 2 s.c om } if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteTSecGroup", pkey); } CFAstTSecGroupByTenantIdxKey keyTenantIdx = schema.getFactoryTSecGroup().newTenantIdxKey(); keyTenantIdx.setRequiredTenantId(existing.getRequiredTenantId()); CFAstTSecGroupByUNameIdxKey keyUNameIdx = schema.getFactoryTSecGroup().newUNameIdxKey(); keyUNameIdx.setRequiredTenantId(existing.getRequiredTenantId()); keyUNameIdx.setRequiredName(existing.getRequiredName()); // Validate reverse foreign keys // Delete is valid schema.getTableTSecGroupInclude().deleteTSecGroupIncludeByGroupIdx(Authorization, Buff.getRequiredTenantId(), Buff.getRequiredTSecGroupId()); schema.getTableTSecGroupMember().deleteTSecGroupMemberByGroupIdx(Authorization, Buff.getRequiredTenantId(), Buff.getRequiredTSecGroupId()); schema.getTableTSecGroupInclude().deleteTSecGroupIncludeByIncludeIdx(Authorization, Buff.getRequiredTenantId(), Buff.getRequiredTSecGroupId()); SortedMap<CFAstTSecGroupPKey, CFAstTSecGroupBuff> subdict; dictByPKey.remove(pkey); subdict = dictByTenantIdx.get(keyTenantIdx); subdict.remove(pkey); dictByUNameIdx.remove(keyUNameIdx); }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccRam.CFAccRamURLProtocolTable.java
public void deleteURLProtocol(CFAccAuthorization Authorization, CFAccURLProtocolBuff Buff) { final String S_ProcName = "CFAccRamURLProtocolTable.deleteURLProtocol() "; CFAccURLProtocolPKey pkey = schema.getFactoryURLProtocol().newPKey(); pkey.setRequiredURLProtocolId(Buff.getRequiredURLProtocolId()); CFAccURLProtocolBuff existing = dictByPKey.get(pkey); if (existing == null) { return;/*from w w w .j a va2 s. co m*/ } if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteURLProtocol", pkey); } CFAccURLProtocolByUNameIdxKey keyUNameIdx = schema.getFactoryURLProtocol().newUNameIdxKey(); keyUNameIdx.setRequiredName(existing.getRequiredName()); CFAccURLProtocolByIsSecureIdxKey keyIsSecureIdx = schema.getFactoryURLProtocol().newIsSecureIdxKey(); keyIsSecureIdx.setRequiredIsSecure(existing.getRequiredIsSecure()); // Validate reverse foreign keys // Delete is valid SortedMap<CFAccURLProtocolPKey, CFAccURLProtocolBuff> subdict; dictByPKey.remove(pkey); dictByUNameIdx.remove(keyUNameIdx); subdict = dictByIsSecureIdx.get(keyIsSecureIdx); subdict.remove(pkey); }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstRam.CFAstRamURLProtocolTable.java
public void deleteURLProtocol(CFAstAuthorization Authorization, CFAstURLProtocolBuff Buff) { final String S_ProcName = "CFAstRamURLProtocolTable.deleteURLProtocol() "; CFAstURLProtocolPKey pkey = schema.getFactoryURLProtocol().newPKey(); pkey.setRequiredURLProtocolId(Buff.getRequiredURLProtocolId()); CFAstURLProtocolBuff existing = dictByPKey.get(pkey); if (existing == null) { return;// www.ja va2s. c o m } if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteURLProtocol", pkey); } CFAstURLProtocolByUNameIdxKey keyUNameIdx = schema.getFactoryURLProtocol().newUNameIdxKey(); keyUNameIdx.setRequiredName(existing.getRequiredName()); CFAstURLProtocolByIsSecureIdxKey keyIsSecureIdx = schema.getFactoryURLProtocol().newIsSecureIdxKey(); keyIsSecureIdx.setRequiredIsSecure(existing.getRequiredIsSecure()); // Validate reverse foreign keys // Delete is valid SortedMap<CFAstURLProtocolPKey, CFAstURLProtocolBuff> subdict; dictByPKey.remove(pkey); dictByUNameIdx.remove(keyUNameIdx); subdict = dictByIsSecureIdx.get(keyIsSecureIdx); subdict.remove(pkey); }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccRam.CFAccRamSecGroupTable.java
public void deleteSecGroup(CFAccAuthorization Authorization, CFAccSecGroupBuff Buff) { final String S_ProcName = "CFAccRamSecGroupTable.deleteSecGroup() "; CFAccSecGroupPKey pkey = schema.getFactorySecGroup().newPKey(); pkey.setRequiredClusterId(Buff.getRequiredClusterId()); pkey.setRequiredSecGroupId(Buff.getRequiredSecGroupId()); CFAccSecGroupBuff existing = dictByPKey.get(pkey); if (existing == null) { return;//from ww w . j av a 2 s. co m } if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteSecGroup", pkey); } CFAccSecGroupByClusterIdxKey keyClusterIdx = schema.getFactorySecGroup().newClusterIdxKey(); keyClusterIdx.setRequiredClusterId(existing.getRequiredClusterId()); CFAccSecGroupByUNameIdxKey keyUNameIdx = schema.getFactorySecGroup().newUNameIdxKey(); keyUNameIdx.setRequiredClusterId(existing.getRequiredClusterId()); keyUNameIdx.setRequiredName(existing.getRequiredName()); // Validate reverse foreign keys // Delete is valid schema.getTableSecGroupInclude().deleteSecGroupIncludeByGroupIdx(Authorization, Buff.getRequiredClusterId(), Buff.getRequiredSecGroupId()); schema.getTableSecGroupMember().deleteSecGroupMemberByGroupIdx(Authorization, Buff.getRequiredClusterId(), Buff.getRequiredSecGroupId()); schema.getTableSecGroupInclude().deleteSecGroupIncludeByIncludeIdx(Authorization, Buff.getRequiredClusterId(), Buff.getRequiredSecGroupId()); schema.getTableSecGroupForm().deleteSecGroupFormByGroupIdx(Authorization, Buff.getRequiredClusterId(), Buff.getRequiredSecGroupId()); SortedMap<CFAccSecGroupPKey, CFAccSecGroupBuff> subdict; dictByPKey.remove(pkey); subdict = dictByClusterIdx.get(keyClusterIdx); subdict.remove(pkey); dictByUNameIdx.remove(keyUNameIdx); }
From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstRam.CFAstRamSecGroupTable.java
public void deleteSecGroup(CFAstAuthorization Authorization, CFAstSecGroupBuff Buff) { final String S_ProcName = "CFAstRamSecGroupTable.deleteSecGroup() "; CFAstSecGroupPKey pkey = schema.getFactorySecGroup().newPKey(); pkey.setRequiredClusterId(Buff.getRequiredClusterId()); pkey.setRequiredSecGroupId(Buff.getRequiredSecGroupId()); CFAstSecGroupBuff existing = dictByPKey.get(pkey); if (existing == null) { return;// w w w .jav a 2 s . co m } if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteSecGroup", pkey); } CFAstSecGroupByClusterIdxKey keyClusterIdx = schema.getFactorySecGroup().newClusterIdxKey(); keyClusterIdx.setRequiredClusterId(existing.getRequiredClusterId()); CFAstSecGroupByUNameIdxKey keyUNameIdx = schema.getFactorySecGroup().newUNameIdxKey(); keyUNameIdx.setRequiredClusterId(existing.getRequiredClusterId()); keyUNameIdx.setRequiredName(existing.getRequiredName()); // Validate reverse foreign keys // Delete is valid schema.getTableSecGroupInclude().deleteSecGroupIncludeByGroupIdx(Authorization, Buff.getRequiredClusterId(), Buff.getRequiredSecGroupId()); schema.getTableSecGroupMember().deleteSecGroupMemberByGroupIdx(Authorization, Buff.getRequiredClusterId(), Buff.getRequiredSecGroupId()); schema.getTableSecGroupInclude().deleteSecGroupIncludeByIncludeIdx(Authorization, Buff.getRequiredClusterId(), Buff.getRequiredSecGroupId()); schema.getTableSecGroupForm().deleteSecGroupFormByGroupIdx(Authorization, Buff.getRequiredClusterId(), Buff.getRequiredSecGroupId()); SortedMap<CFAstSecGroupPKey, CFAstSecGroupBuff> subdict; dictByPKey.remove(pkey); subdict = dictByClusterIdx.get(keyClusterIdx); subdict.remove(pkey); dictByUNameIdx.remove(keyUNameIdx); }
From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccRam.CFAccRamContactListTable.java
public void deleteContactList(CFAccAuthorization Authorization, CFAccContactListBuff Buff) { final String S_ProcName = "CFAccRamContactListTable.deleteContactList() "; CFAccContactListPKey pkey = schema.getFactoryContactList().newPKey(); pkey.setRequiredTenantId(Buff.getRequiredTenantId()); pkey.setRequiredContactListId(Buff.getRequiredContactListId()); CFAccContactListBuff existing = dictByPKey.get(pkey); if (existing == null) { return;/* ww w . j a v a 2 s . c o m*/ } if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteContactList", pkey); } CFAccContactListByTenantIdxKey keyTenantIdx = schema.getFactoryContactList().newTenantIdxKey(); keyTenantIdx.setRequiredTenantId(existing.getRequiredTenantId()); CFAccContactListByUDescrIdxKey keyUDescrIdx = schema.getFactoryContactList().newUDescrIdxKey(); keyUDescrIdx.setRequiredTenantId(existing.getRequiredTenantId()); keyUDescrIdx.setRequiredDescription(existing.getRequiredDescription()); // Validate reverse foreign keys // Delete is valid schema.getTableContact().deleteContactByContListIdx(Authorization, Buff.getRequiredTenantId(), Buff.getRequiredContactListId()); schema.getTableAccountContact().deleteAccountContactByCtctLstIdx(Authorization, Buff.getRequiredTenantId(), Buff.getRequiredContactListId()); SortedMap<CFAccContactListPKey, CFAccContactListBuff> subdict; dictByPKey.remove(pkey); subdict = dictByTenantIdx.get(keyTenantIdx); subdict.remove(pkey); dictByUDescrIdx.remove(keyUDescrIdx); }
From source file:net.sourceforge.msscodefactory.cfcore.v1_11.GenKbRam.GenKbRamContactListTable.java
public void updateContactList(GenKbAuthorization Authorization, GenKbContactListBuff Buff) { GenKbContactListPKey pkey = schema.getFactoryContactList().newPKey(); pkey.setRequiredContactListId(Buff.getRequiredContactListId()); GenKbContactListBuff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updateContactList", "Existing record not found", "ContactList", pkey); }/* w ww . j a va 2s. com*/ if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "updateContactList", pkey); } Buff.setRequiredRevision(Buff.getRequiredRevision() + 1); GenKbContactListByTenantIdxKey existingKeyTenantIdx = schema.getFactoryContactList().newTenantIdxKey(); existingKeyTenantIdx.setRequiredTenantId(existing.getRequiredTenantId()); GenKbContactListByTenantIdxKey newKeyTenantIdx = schema.getFactoryContactList().newTenantIdxKey(); newKeyTenantIdx.setRequiredTenantId(Buff.getRequiredTenantId()); GenKbContactListByUDescrIdxKey existingKeyUDescrIdx = schema.getFactoryContactList().newUDescrIdxKey(); existingKeyUDescrIdx.setRequiredTenantId(existing.getRequiredTenantId()); existingKeyUDescrIdx.setRequiredDescription(existing.getRequiredDescription()); GenKbContactListByUDescrIdxKey newKeyUDescrIdx = schema.getFactoryContactList().newUDescrIdxKey(); newKeyUDescrIdx.setRequiredTenantId(Buff.getRequiredTenantId()); newKeyUDescrIdx.setRequiredDescription(Buff.getRequiredDescription()); // Check unique indexes if (!existingKeyUDescrIdx.equals(newKeyUDescrIdx)) { if (dictByUDescrIdx.containsKey(newKeyUDescrIdx)) { throw CFLib.getDefaultExceptionFactory().newUniqueIndexViolationException(getClass(), "updateContactList", "ContactListUDescrIdx", newKeyUDescrIdx); } } // Validate foreign keys { boolean allNull = true; if (allNull) { if (null == schema.getTableTenant().readDerivedByPIdx(Authorization, Buff.getRequiredTenantId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updateContactList", "Container", "ContactListTenant", "Tenant", null); } } } // Update is valid SortedMap<GenKbContactListPKey, GenKbContactListBuff> subdict; dictByPKey.remove(pkey); dictByPKey.put(pkey, Buff); subdict = dictByTenantIdx.get(existingKeyTenantIdx); if (subdict != null) { subdict.remove(pkey); } if (dictByTenantIdx.containsKey(newKeyTenantIdx)) { subdict = dictByTenantIdx.get(newKeyTenantIdx); } else { subdict = new TreeMap<GenKbContactListPKey, GenKbContactListBuff>(); dictByTenantIdx.put(newKeyTenantIdx, subdict); } subdict.put(pkey, Buff); dictByUDescrIdx.remove(existingKeyUDescrIdx); dictByUDescrIdx.put(newKeyUDescrIdx, Buff); }