List of usage examples for java.util SortedMap remove
V remove(Object key);
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamTagTable.java
public void deleteTag(MSSBamAuthorization Authorization, MSSBamTagBuff Buff) { final String S_ProcName = "MSSBamRamTagTable.deleteTag() "; MSSBamTagPKey pkey = schema.getFactoryTag().newPKey(); pkey.setRequiredId(schema.nextTagIdGen()); MSSBamTagBuff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "deleteTag", "Existing record not found", "Tag", pkey); }/*from ww w. j a va 2 s . c o m*/ if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteTag", pkey); } MSSBamTagByTenantIdxKey keyTenantIdx = schema.getFactoryTag().newTenantIdxKey(); keyTenantIdx.setRequiredTenantId(existing.getRequiredTenantId()); MSSBamTagByNameIdxKey keyNameIdx = schema.getFactoryTag().newNameIdxKey(); keyNameIdx.setRequiredTenantId(existing.getRequiredTenantId()); keyNameIdx.setRequiredName(existing.getRequiredName()); // Validate reverse foreign keys if (schema.getTableAddressTag().readDerivedByTagIdx(Authorization, existing.getRequiredId()).length > 0) { throw CFLib.getDefaultExceptionFactory().newDependentsDetectedException(getClass(), "deleteTag", "Lookup", "Tag", "AddressTag", pkey); } if (schema.getTableAttachmentTag().readDerivedByTagIdx(Authorization, existing.getRequiredId()).length > 0) { throw CFLib.getDefaultExceptionFactory().newDependentsDetectedException(getClass(), "deleteTag", "Lookup", "Tag", "AttachmentTag", pkey); } if (schema.getTableContactTag().readDerivedByTagIdx(Authorization, existing.getRequiredId()).length > 0) { throw CFLib.getDefaultExceptionFactory().newDependentsDetectedException(getClass(), "deleteTag", "Lookup", "ContactTagTag", "ContactTag", pkey); } if (schema.getTableMemoTag().readDerivedByTagIdx(Authorization, existing.getRequiredId()).length > 0) { throw CFLib.getDefaultExceptionFactory().newDependentsDetectedException(getClass(), "deleteTag", "Lookup", "Tag", "MemoTag", pkey); } if (schema.getTablePhoneTag().readDerivedByTagIdx(Authorization, existing.getRequiredId()).length > 0) { throw CFLib.getDefaultExceptionFactory().newDependentsDetectedException(getClass(), "deleteTag", "Lookup", "Tag", "PhoneTag", pkey); } // Delete is valid SortedMap<MSSBamTagPKey, MSSBamTagBuff> subdict; dictByPKey.remove(pkey); subdict = dictByTenantIdx.get(keyTenantIdx); subdict.remove(pkey); dictByNameIdx.remove(keyNameIdx); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamTenantTable.java
public void updateTenant(MSSBamAuthorization Authorization, MSSBamTenantBuff Buff) { MSSBamTenantPKey pkey = schema.getFactoryTenant().newPKey(); pkey.setRequiredId(Buff.getRequiredId()); MSSBamTenantBuff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updateTenant", "Existing record not found", "Tenant", pkey); }/*from w w w. ja va2s.co m*/ if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "updateTenant", pkey); } Buff.setRequiredRevision(Buff.getRequiredRevision() + 1); MSSBamTenantByClusterIdxKey existingKeyClusterIdx = schema.getFactoryTenant().newClusterIdxKey(); existingKeyClusterIdx.setRequiredClusterId(existing.getRequiredClusterId()); MSSBamTenantByClusterIdxKey newKeyClusterIdx = schema.getFactoryTenant().newClusterIdxKey(); newKeyClusterIdx.setRequiredClusterId(Buff.getRequiredClusterId()); MSSBamTenantByUNameIdxKey existingKeyUNameIdx = schema.getFactoryTenant().newUNameIdxKey(); existingKeyUNameIdx.setRequiredClusterId(existing.getRequiredClusterId()); existingKeyUNameIdx.setRequiredTenantName(existing.getRequiredTenantName()); MSSBamTenantByUNameIdxKey newKeyUNameIdx = schema.getFactoryTenant().newUNameIdxKey(); newKeyUNameIdx.setRequiredClusterId(Buff.getRequiredClusterId()); newKeyUNameIdx.setRequiredTenantName(Buff.getRequiredTenantName()); // Check unique indexes if (!existingKeyUNameIdx.equals(newKeyUNameIdx)) { if (dictByUNameIdx.containsKey(newKeyUNameIdx)) { throw CFLib.getDefaultExceptionFactory().newUniqueIndexViolationException(getClass(), "updateTenant", "TenantUNameIdx", newKeyUNameIdx); } } // Validate foreign keys { boolean allNull = true; if (allNull) { if (null == schema.getTableCluster().readDerivedByIdIdx(Authorization, Buff.getRequiredClusterId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updateTenant", "Container", "TenantCluster", "Cluster", null); } } } // Update is valid SortedMap<MSSBamTenantPKey, MSSBamTenantBuff> subdict; dictByPKey.remove(pkey); dictByPKey.put(pkey, Buff); subdict = dictByClusterIdx.get(existingKeyClusterIdx); if (subdict != null) { subdict.remove(pkey); } if (dictByClusterIdx.containsKey(newKeyClusterIdx)) { subdict = dictByClusterIdx.get(newKeyClusterIdx); } else { subdict = new TreeMap<MSSBamTenantPKey, MSSBamTenantBuff>(); dictByClusterIdx.put(newKeyClusterIdx, subdict); } subdict.put(pkey, Buff); dictByUNameIdx.remove(existingKeyUNameIdx); dictByUNameIdx.put(newKeyUNameIdx, Buff); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamTenantTable.java
public void deleteTenant(MSSBamAuthorization Authorization, MSSBamTenantBuff Buff) { final String S_ProcName = "MSSBamRamTenantTable.deleteTenant() "; MSSBamTenantPKey pkey = schema.getFactoryTenant().newPKey(); pkey.setRequiredId(schema.nextTenantIdGen()); MSSBamTenantBuff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "deleteTenant", "Existing record not found", "Tenant", pkey); }//from w w w .ja v a2 s . co m if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteTenant", pkey); } MSSBamTenantByClusterIdxKey keyClusterIdx = schema.getFactoryTenant().newClusterIdxKey(); keyClusterIdx.setRequiredClusterId(existing.getRequiredClusterId()); MSSBamTenantByUNameIdxKey keyUNameIdx = schema.getFactoryTenant().newUNameIdxKey(); keyUNameIdx.setRequiredClusterId(existing.getRequiredClusterId()); keyUNameIdx.setRequiredTenantName(existing.getRequiredTenantName()); // Validate reverse foreign keys if (schema.getTableContactList().readDerivedByTenantIdx(Authorization, existing.getRequiredId()).length > 0) { throw CFLib.getDefaultExceptionFactory().newDependentsDetectedException(getClass(), "deleteTenant", "Container", "ContactListTenant", "ContactList", pkey); } if (schema.getTableTag().readDerivedByTenantIdx(Authorization, existing.getRequiredId()).length > 0) { throw CFLib.getDefaultExceptionFactory().newDependentsDetectedException(getClass(), "deleteTenant", "Container", "TagTenant", "Tag", pkey); } // Delete is valid SortedMap<MSSBamTenantPKey, MSSBamTenantBuff> subdict; dictByPKey.remove(pkey); subdict = dictByClusterIdx.get(keyClusterIdx); subdict.remove(pkey); dictByUNameIdx.remove(keyUNameIdx); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamTLDTable.java
public void updateTLD(MSSBamAuthorization Authorization, MSSBamTLDBuff Buff) { MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(Buff.getRequiredId()); MSSBamTLDBuff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updateTLD", "Existing record not found", "TLD", pkey); }/*from ww w . java 2 s. co m*/ MSSBamTLDByDictIdxKey existingKeyDictIdx = schema.getFactoryTLD().newDictIdxKey(); existingKeyDictIdx.setRequiredDictionaryId(existing.getRequiredDictionaryId()); MSSBamTLDByDictIdxKey newKeyDictIdx = schema.getFactoryTLD().newDictIdxKey(); newKeyDictIdx.setRequiredDictionaryId(Buff.getRequiredDictionaryId()); // Check unique indexes // Validate foreign keys { boolean allNull = true; if (allNull) { if (null == schema.getTableBaseDomain().readDerivedByIdIdx(Authorization, Buff.getRequiredId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updateTLD", "Superclass", "SuperClass", "BaseDomain", null); } } } { boolean allNull = true; if (allNull) { if (null == schema.getTableDictionary().readDerivedByIdIdx(Authorization, Buff.getRequiredDictionaryId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updateTLD", "Container", "Dictionary", "Dictionary", null); } } } // Update is valid SortedMap<MSSBamAnyObjPKey, MSSBamTLDBuff> subdict; dictByPKey.remove(pkey); dictByPKey.put(pkey, Buff); subdict = dictByDictIdx.get(existingKeyDictIdx); if (subdict != null) { subdict.remove(pkey); } if (dictByDictIdx.containsKey(newKeyDictIdx)) { subdict = dictByDictIdx.get(newKeyDictIdx); } else { subdict = new TreeMap<MSSBamAnyObjPKey, MSSBamTLDBuff>(); dictByDictIdx.put(newKeyDictIdx, subdict); } subdict.put(pkey, Buff); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamTLDTable.java
public void deleteTLD(MSSBamAuthorization Authorization, MSSBamTLDBuff Buff) { final String S_ProcName = "MSSBamRamTLDTable.deleteTLD() "; MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(schema.nextAnyObjIdGen()); MSSBamTLDBuff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "deleteTLD", "Existing record not found", "TLD", pkey); }// w ww . j ava 2 s .c o m if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteTLD", pkey); } MSSBamTLDByDictIdxKey keyDictIdx = schema.getFactoryTLD().newDictIdxKey(); keyDictIdx.setRequiredDictionaryId(existing.getRequiredDictionaryId()); // Validate reverse foreign keys // Delete is valid SortedMap<MSSBamAnyObjPKey, MSSBamTLDBuff> subdict; dictByPKey.remove(pkey); subdict = dictByDictIdx.get(keyDictIdx); subdict.remove(pkey); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamUserTable.java
public void updateUser(MSSBamAuthorization Authorization, MSSBamUserBuff Buff) { MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(Buff.getRequiredId()); MSSBamUserBuff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updateUser", "Existing record not found", "User", pkey); }/*from www. j a v a2 s .co m*/ MSSBamUserByDomainIdxKey existingKeyDomainIdx = schema.getFactoryUser().newDomainIdxKey(); existingKeyDomainIdx.setRequiredDomainId(existing.getRequiredDomainId()); MSSBamUserByDomainIdxKey newKeyDomainIdx = schema.getFactoryUser().newDomainIdxKey(); newKeyDomainIdx.setRequiredDomainId(Buff.getRequiredDomainId()); MSSBamUserByLEEmpIdxKey existingKeyLEEmpIdx = schema.getFactoryUser().newLEEmpIdxKey(); existingKeyLEEmpIdx.setRequiredDomainId(existing.getRequiredDomainId()); existingKeyLEEmpIdx.setOptionalEmployeeId(existing.getOptionalEmployeeId()); MSSBamUserByLEEmpIdxKey newKeyLEEmpIdx = schema.getFactoryUser().newLEEmpIdxKey(); newKeyLEEmpIdx.setRequiredDomainId(Buff.getRequiredDomainId()); newKeyLEEmpIdx.setOptionalEmployeeId(Buff.getOptionalEmployeeId()); MSSBamUserByLECrmIdxKey existingKeyLECrmIdx = schema.getFactoryUser().newLECrmIdxKey(); existingKeyLECrmIdx.setRequiredDomainId(existing.getRequiredDomainId()); existingKeyLECrmIdx.setOptionalCRMId(existing.getOptionalCRMId()); MSSBamUserByLECrmIdxKey newKeyLECrmIdx = schema.getFactoryUser().newLECrmIdxKey(); newKeyLECrmIdx.setRequiredDomainId(Buff.getRequiredDomainId()); newKeyLECrmIdx.setOptionalCRMId(Buff.getOptionalCRMId()); // Check unique indexes if (!existingKeyLEEmpIdx.equals(newKeyLEEmpIdx)) { if (dictByLEEmpIdx.containsKey(newKeyLEEmpIdx)) { throw CFLib.getDefaultExceptionFactory().newUniqueIndexViolationException(getClass(), "updateUser", "UserDomainEmpIdx", newKeyLEEmpIdx); } } if (!existingKeyLECrmIdx.equals(newKeyLECrmIdx)) { if (dictByLECrmIdx.containsKey(newKeyLECrmIdx)) { throw CFLib.getDefaultExceptionFactory().newUniqueIndexViolationException(getClass(), "updateUser", "UserDomainCrmIdx", newKeyLECrmIdx); } } // Validate foreign keys { boolean allNull = true; if (allNull) { if (null == schema.getTableLegalEntity().readDerivedByIdIdx(Authorization, Buff.getRequiredId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updateUser", "Superclass", "SuperClass", "LegalEntity", null); } } } { boolean allNull = true; if (allNull) { if (null == schema.getTableDomain().readDerivedByIdIdx(Authorization, Buff.getRequiredDomainId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updateUser", "Container", "Domain", "Domain", null); } } } // Update is valid SortedMap<MSSBamAnyObjPKey, MSSBamUserBuff> subdict; dictByPKey.remove(pkey); dictByPKey.put(pkey, Buff); subdict = dictByDomainIdx.get(existingKeyDomainIdx); if (subdict != null) { subdict.remove(pkey); } if (dictByDomainIdx.containsKey(newKeyDomainIdx)) { subdict = dictByDomainIdx.get(newKeyDomainIdx); } else { subdict = new TreeMap<MSSBamAnyObjPKey, MSSBamUserBuff>(); dictByDomainIdx.put(newKeyDomainIdx, subdict); } subdict.put(pkey, Buff); dictByLEEmpIdx.remove(existingKeyLEEmpIdx); dictByLEEmpIdx.put(newKeyLEEmpIdx, Buff); dictByLECrmIdx.remove(existingKeyLECrmIdx); dictByLECrmIdx.put(newKeyLECrmIdx, Buff); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamUserTable.java
public void deleteUser(MSSBamAuthorization Authorization, MSSBamUserBuff Buff) { final String S_ProcName = "MSSBamRamUserTable.deleteUser() "; MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(schema.nextAnyObjIdGen()); MSSBamUserBuff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "deleteUser", "Existing record not found", "User", pkey); }/* w w w. j a v a 2 s . c o m*/ if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteUser", pkey); } MSSBamUserByDomainIdxKey keyDomainIdx = schema.getFactoryUser().newDomainIdxKey(); keyDomainIdx.setRequiredDomainId(existing.getRequiredDomainId()); MSSBamUserByLEEmpIdxKey keyLEEmpIdx = schema.getFactoryUser().newLEEmpIdxKey(); keyLEEmpIdx.setRequiredDomainId(existing.getRequiredDomainId()); keyLEEmpIdx.setOptionalEmployeeId(existing.getOptionalEmployeeId()); MSSBamUserByLECrmIdxKey keyLECrmIdx = schema.getFactoryUser().newLECrmIdxKey(); keyLECrmIdx.setRequiredDomainId(existing.getRequiredDomainId()); keyLECrmIdx.setOptionalCRMId(existing.getOptionalCRMId()); // Validate reverse foreign keys // Delete is valid SortedMap<MSSBamAnyObjPKey, MSSBamUserBuff> subdict; dictByPKey.remove(pkey); subdict = dictByDomainIdx.get(keyDomainIdx); subdict.remove(pkey); dictByLEEmpIdx.remove(keyLEEmpIdx); dictByLECrmIdx.remove(keyLECrmIdx); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamUuidGenDefTable.java
public void updateUuidGenDef(MSSBamAuthorization Authorization, MSSBamUuidGenDefBuff Buff) { MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(Buff.getRequiredId()); MSSBamUuidGenDefBuff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updateUuidGenDef", "Existing record not found", "UuidGenDef", pkey); }// w w w. j ava2s .c om MSSBamUuidGenDefByDispIdxKey existingKeyDispIdx = schema.getFactoryUuidGenDef().newDispIdxKey(); existingKeyDispIdx.setOptionalDispenserId(existing.getOptionalDispenserId()); MSSBamUuidGenDefByDispIdxKey newKeyDispIdx = schema.getFactoryUuidGenDef().newDispIdxKey(); newKeyDispIdx.setOptionalDispenserId(Buff.getOptionalDispenserId()); // Check unique indexes // Validate foreign keys { boolean allNull = true; if (allNull) { if (null == schema.getTableUuidDef().readDerivedByIdIdx(Authorization, Buff.getRequiredId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updateUuidGenDef", "Superclass", "SuperClass", "UuidDef", null); } } } // Update is valid SortedMap<MSSBamAnyObjPKey, MSSBamUuidGenDefBuff> subdict; dictByPKey.remove(pkey); dictByPKey.put(pkey, Buff); subdict = dictByDispIdx.get(existingKeyDispIdx); if (subdict != null) { subdict.remove(pkey); } if (dictByDispIdx.containsKey(newKeyDispIdx)) { subdict = dictByDispIdx.get(newKeyDispIdx); } else { subdict = new TreeMap<MSSBamAnyObjPKey, MSSBamUuidGenDefBuff>(); dictByDispIdx.put(newKeyDispIdx, subdict); } subdict.put(pkey, Buff); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamUuidGenDefTable.java
public void deleteUuidGenDef(MSSBamAuthorization Authorization, MSSBamUuidGenDefBuff Buff) { final String S_ProcName = "MSSBamRamUuidGenDefTable.deleteUuidGenDef() "; MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(schema.nextAnyObjIdGen()); MSSBamUuidGenDefBuff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "deleteUuidGenDef", "Existing record not found", "UuidGenDef", pkey); }/*w w w. j a va 2 s. c o m*/ if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteUuidGenDef", pkey); } MSSBamUuidGenDefByDispIdxKey keyDispIdx = schema.getFactoryUuidGenDef().newDispIdxKey(); keyDispIdx.setOptionalDispenserId(existing.getOptionalDispenserId()); // Validate reverse foreign keys if (schema.getTableTableUuidGen().readDerivedByIdIdx(Authorization, existing.getRequiredId()) != null) { throw CFLib.getDefaultExceptionFactory().newDependentsDetectedException(getClass(), "deleteUuidGenDef", "Superclass", "SuperClass", "TableUuidGen", pkey); } if (schema.getTableSchemaUuidGen().readDerivedByIdIdx(Authorization, existing.getRequiredId()) != null) { throw CFLib.getDefaultExceptionFactory().newDependentsDetectedException(getClass(), "deleteUuidGenDef", "Superclass", "SuperClass", "SchemaUuidGen", pkey); } // Delete is valid SortedMap<MSSBamAnyObjPKey, MSSBamUuidGenDefBuff> subdict; dictByPKey.remove(pkey); subdict = dictByDispIdx.get(keyDispIdx); subdict.remove(pkey); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamValueTable.java
public void updateValue(MSSBamAuthorization Authorization, MSSBamValueBuff Buff) { MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(Buff.getRequiredId()); MSSBamValueBuff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updateValue", "Existing record not found", "Value", pkey); }// w w w . jav a 2 s. co m MSSBamValueByVContIdxKey existingKeyVContIdx = schema.getFactoryValue().newVContIdxKey(); existingKeyVContIdx.setRequiredValueContainerId(existing.getRequiredValueContainerId()); MSSBamValueByVContIdxKey newKeyVContIdx = schema.getFactoryValue().newVContIdxKey(); newKeyVContIdx.setRequiredValueContainerId(Buff.getRequiredValueContainerId()); MSSBamValueByDataScopeIdxKey existingKeyDataScopeIdx = schema.getFactoryValue().newDataScopeIdxKey(); existingKeyDataScopeIdx.setOptionalDataScopeId(existing.getOptionalDataScopeId()); MSSBamValueByDataScopeIdxKey newKeyDataScopeIdx = schema.getFactoryValue().newDataScopeIdxKey(); newKeyDataScopeIdx.setOptionalDataScopeId(Buff.getOptionalDataScopeId()); MSSBamValueByVAccSecIdxKey existingKeyVAccSecIdx = schema.getFactoryValue().newVAccSecIdxKey(); existingKeyVAccSecIdx.setOptionalViewAccessSecurityId(existing.getOptionalViewAccessSecurityId()); MSSBamValueByVAccSecIdxKey newKeyVAccSecIdx = schema.getFactoryValue().newVAccSecIdxKey(); newKeyVAccSecIdx.setOptionalViewAccessSecurityId(Buff.getOptionalViewAccessSecurityId()); MSSBamValueByVAccFreqIdxKey existingKeyVAccFreqIdx = schema.getFactoryValue().newVAccFreqIdxKey(); existingKeyVAccFreqIdx.setOptionalViewAccessFrequencyId(existing.getOptionalViewAccessFrequencyId()); MSSBamValueByVAccFreqIdxKey newKeyVAccFreqIdx = schema.getFactoryValue().newVAccFreqIdxKey(); newKeyVAccFreqIdx.setOptionalViewAccessFrequencyId(Buff.getOptionalViewAccessFrequencyId()); MSSBamValueByEAccSecIdxKey existingKeyEAccSecIdx = schema.getFactoryValue().newEAccSecIdxKey(); existingKeyEAccSecIdx.setOptionalEditAccessSecurityId(existing.getOptionalEditAccessSecurityId()); MSSBamValueByEAccSecIdxKey newKeyEAccSecIdx = schema.getFactoryValue().newEAccSecIdxKey(); newKeyEAccSecIdx.setOptionalEditAccessSecurityId(Buff.getOptionalEditAccessSecurityId()); MSSBamValueByEAccFreqIdxKey existingKeyEAccFreqIdx = schema.getFactoryValue().newEAccFreqIdxKey(); existingKeyEAccFreqIdx.setOptionalEditAccessFrequencyId(existing.getOptionalEditAccessFrequencyId()); MSSBamValueByEAccFreqIdxKey newKeyEAccFreqIdx = schema.getFactoryValue().newEAccFreqIdxKey(); newKeyEAccFreqIdx.setOptionalEditAccessFrequencyId(Buff.getOptionalEditAccessFrequencyId()); MSSBamValueByPrevIdxKey existingKeyPrevIdx = schema.getFactoryValue().newPrevIdxKey(); existingKeyPrevIdx.setOptionalPrevId(existing.getOptionalPrevId()); MSSBamValueByPrevIdxKey newKeyPrevIdx = schema.getFactoryValue().newPrevIdxKey(); newKeyPrevIdx.setOptionalPrevId(Buff.getOptionalPrevId()); MSSBamValueByNextIdxKey existingKeyNextIdx = schema.getFactoryValue().newNextIdxKey(); existingKeyNextIdx.setOptionalNextId(existing.getOptionalNextId()); MSSBamValueByNextIdxKey newKeyNextIdx = schema.getFactoryValue().newNextIdxKey(); newKeyNextIdx.setOptionalNextId(Buff.getOptionalNextId()); MSSBamValueByContPrevIdxKey existingKeyContPrevIdx = schema.getFactoryValue().newContPrevIdxKey(); existingKeyContPrevIdx.setRequiredValueContainerId(existing.getRequiredValueContainerId()); existingKeyContPrevIdx.setOptionalPrevId(existing.getOptionalPrevId()); MSSBamValueByContPrevIdxKey newKeyContPrevIdx = schema.getFactoryValue().newContPrevIdxKey(); newKeyContPrevIdx.setRequiredValueContainerId(Buff.getRequiredValueContainerId()); newKeyContPrevIdx.setOptionalPrevId(Buff.getOptionalPrevId()); MSSBamValueByContNextIdxKey existingKeyContNextIdx = schema.getFactoryValue().newContNextIdxKey(); existingKeyContNextIdx.setRequiredValueContainerId(existing.getRequiredValueContainerId()); existingKeyContNextIdx.setOptionalNextId(existing.getOptionalNextId()); MSSBamValueByContNextIdxKey newKeyContNextIdx = schema.getFactoryValue().newContNextIdxKey(); newKeyContNextIdx.setRequiredValueContainerId(Buff.getRequiredValueContainerId()); newKeyContNextIdx.setOptionalNextId(Buff.getOptionalNextId()); // Check unique indexes // Validate foreign keys { boolean allNull = true; if (allNull) { if (null == schema.getTableScope().readDerivedByIdIdx(Authorization, Buff.getRequiredId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updateValue", "Superclass", "SuperClass", "Scope", null); } } } { boolean allNull = true; if (allNull) { if (null == schema.getTableScope().readDerivedByIdIdx(Authorization, Buff.getRequiredValueContainerId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updateValue", "Container", "ValueContainer", "Scope", null); } } } // Update is valid SortedMap<MSSBamAnyObjPKey, MSSBamValueBuff> subdict; dictByPKey.remove(pkey); dictByPKey.put(pkey, Buff); subdict = dictByVContIdx.get(existingKeyVContIdx); if (subdict != null) { subdict.remove(pkey); } if (dictByVContIdx.containsKey(newKeyVContIdx)) { subdict = dictByVContIdx.get(newKeyVContIdx); } else { subdict = new TreeMap<MSSBamAnyObjPKey, MSSBamValueBuff>(); dictByVContIdx.put(newKeyVContIdx, subdict); } subdict.put(pkey, Buff); subdict = dictByDataScopeIdx.get(existingKeyDataScopeIdx); if (subdict != null) { subdict.remove(pkey); } if (dictByDataScopeIdx.containsKey(newKeyDataScopeIdx)) { subdict = dictByDataScopeIdx.get(newKeyDataScopeIdx); } else { subdict = new TreeMap<MSSBamAnyObjPKey, MSSBamValueBuff>(); dictByDataScopeIdx.put(newKeyDataScopeIdx, subdict); } subdict.put(pkey, Buff); subdict = dictByVAccSecIdx.get(existingKeyVAccSecIdx); if (subdict != null) { subdict.remove(pkey); } if (dictByVAccSecIdx.containsKey(newKeyVAccSecIdx)) { subdict = dictByVAccSecIdx.get(newKeyVAccSecIdx); } else { subdict = new TreeMap<MSSBamAnyObjPKey, MSSBamValueBuff>(); dictByVAccSecIdx.put(newKeyVAccSecIdx, subdict); } subdict.put(pkey, Buff); subdict = dictByVAccFreqIdx.get(existingKeyVAccFreqIdx); if (subdict != null) { subdict.remove(pkey); } if (dictByVAccFreqIdx.containsKey(newKeyVAccFreqIdx)) { subdict = dictByVAccFreqIdx.get(newKeyVAccFreqIdx); } else { subdict = new TreeMap<MSSBamAnyObjPKey, MSSBamValueBuff>(); dictByVAccFreqIdx.put(newKeyVAccFreqIdx, subdict); } subdict.put(pkey, Buff); subdict = dictByEAccSecIdx.get(existingKeyEAccSecIdx); if (subdict != null) { subdict.remove(pkey); } if (dictByEAccSecIdx.containsKey(newKeyEAccSecIdx)) { subdict = dictByEAccSecIdx.get(newKeyEAccSecIdx); } else { subdict = new TreeMap<MSSBamAnyObjPKey, MSSBamValueBuff>(); dictByEAccSecIdx.put(newKeyEAccSecIdx, subdict); } subdict.put(pkey, Buff); subdict = dictByEAccFreqIdx.get(existingKeyEAccFreqIdx); if (subdict != null) { subdict.remove(pkey); } if (dictByEAccFreqIdx.containsKey(newKeyEAccFreqIdx)) { subdict = dictByEAccFreqIdx.get(newKeyEAccFreqIdx); } else { subdict = new TreeMap<MSSBamAnyObjPKey, MSSBamValueBuff>(); dictByEAccFreqIdx.put(newKeyEAccFreqIdx, subdict); } subdict.put(pkey, Buff); subdict = dictByPrevIdx.get(existingKeyPrevIdx); if (subdict != null) { subdict.remove(pkey); } if (dictByPrevIdx.containsKey(newKeyPrevIdx)) { subdict = dictByPrevIdx.get(newKeyPrevIdx); } else { subdict = new TreeMap<MSSBamAnyObjPKey, MSSBamValueBuff>(); dictByPrevIdx.put(newKeyPrevIdx, subdict); } subdict.put(pkey, Buff); subdict = dictByNextIdx.get(existingKeyNextIdx); if (subdict != null) { subdict.remove(pkey); } if (dictByNextIdx.containsKey(newKeyNextIdx)) { subdict = dictByNextIdx.get(newKeyNextIdx); } else { subdict = new TreeMap<MSSBamAnyObjPKey, MSSBamValueBuff>(); dictByNextIdx.put(newKeyNextIdx, subdict); } subdict.put(pkey, Buff); subdict = dictByContPrevIdx.get(existingKeyContPrevIdx); if (subdict != null) { subdict.remove(pkey); } if (dictByContPrevIdx.containsKey(newKeyContPrevIdx)) { subdict = dictByContPrevIdx.get(newKeyContPrevIdx); } else { subdict = new TreeMap<MSSBamAnyObjPKey, MSSBamValueBuff>(); dictByContPrevIdx.put(newKeyContPrevIdx, subdict); } subdict.put(pkey, Buff); subdict = dictByContNextIdx.get(existingKeyContNextIdx); if (subdict != null) { subdict.remove(pkey); } if (dictByContNextIdx.containsKey(newKeyContNextIdx)) { subdict = dictByContNextIdx.get(newKeyContNextIdx); } else { subdict = new TreeMap<MSSBamAnyObjPKey, MSSBamValueBuff>(); dictByContNextIdx.put(newKeyContNextIdx, subdict); } subdict.put(pkey, Buff); }