List of usage examples for java.util SortedMap remove
V remove(Object key);
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamSchemaId32GenTable.java
public void deleteSchemaId32Gen(MSSBamAuthorization Authorization, MSSBamSchemaId32GenBuff Buff) { final String S_ProcName = "MSSBamRamSchemaId32GenTable.deleteSchemaId32Gen() "; MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(schema.nextAnyObjIdGen()); MSSBamSchemaId32GenBuff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "deleteSchemaId32Gen", "Existing record not found", "SchemaId32Gen", pkey); }/*from ww w. j a va 2 s . c om*/ if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteSchemaId32Gen", pkey); } MSSBamSchemaId32GenByContainerIdxKey keyContainerIdx = schema.getFactorySchemaId32Gen() .newContainerIdxKey(); keyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId()); // Validate reverse foreign keys // Delete is valid SortedMap<MSSBamAnyObjPKey, MSSBamSchemaId32GenBuff> subdict; dictByPKey.remove(pkey); subdict = dictByContainerIdx.get(keyContainerIdx); subdict.remove(pkey); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamSchemaId64GenTable.java
public void updateSchemaId64Gen(MSSBamAuthorization Authorization, MSSBamSchemaId64GenBuff Buff) { MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(Buff.getRequiredId()); MSSBamSchemaId64GenBuff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updateSchemaId64Gen", "Existing record not found", "SchemaId64Gen", pkey); }//w ww . j a va 2 s .co m MSSBamSchemaId64GenByContainerIdxKey existingKeyContainerIdx = schema.getFactorySchemaId64Gen() .newContainerIdxKey(); existingKeyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId()); MSSBamSchemaId64GenByContainerIdxKey newKeyContainerIdx = schema.getFactorySchemaId64Gen() .newContainerIdxKey(); newKeyContainerIdx.setRequiredContainerId(Buff.getRequiredContainerId()); // Check unique indexes // Validate foreign keys { boolean allNull = true; if (allNull) { if (null == schema.getTableId64GenDef().readDerivedByIdIdx(Authorization, Buff.getRequiredId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updateSchemaId64Gen", "Superclass", "SuperClass", "Id64GenDef", null); } } } { boolean allNull = true; if (allNull) { if (null == schema.getTableSchemaDef().readDerivedByIdIdx(Authorization, Buff.getRequiredContainerId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updateSchemaId64Gen", "Container", "CSchema", "SchemaDef", null); } } } // Update is valid SortedMap<MSSBamAnyObjPKey, MSSBamSchemaId64GenBuff> subdict; dictByPKey.remove(pkey); dictByPKey.put(pkey, Buff); subdict = dictByContainerIdx.get(existingKeyContainerIdx); if (subdict != null) { subdict.remove(pkey); } if (dictByContainerIdx.containsKey(newKeyContainerIdx)) { subdict = dictByContainerIdx.get(newKeyContainerIdx); } else { subdict = new TreeMap<MSSBamAnyObjPKey, MSSBamSchemaId64GenBuff>(); dictByContainerIdx.put(newKeyContainerIdx, subdict); } subdict.put(pkey, Buff); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamSchemaId64GenTable.java
public void deleteSchemaId64Gen(MSSBamAuthorization Authorization, MSSBamSchemaId64GenBuff Buff) { final String S_ProcName = "MSSBamRamSchemaId64GenTable.deleteSchemaId64Gen() "; MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(schema.nextAnyObjIdGen()); MSSBamSchemaId64GenBuff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "deleteSchemaId64Gen", "Existing record not found", "SchemaId64Gen", pkey); }//from w w w.j a v a2 s. c o m if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteSchemaId64Gen", pkey); } MSSBamSchemaId64GenByContainerIdxKey keyContainerIdx = schema.getFactorySchemaId64Gen() .newContainerIdxKey(); keyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId()); // Validate reverse foreign keys // Delete is valid SortedMap<MSSBamAnyObjPKey, MSSBamSchemaId64GenBuff> subdict; dictByPKey.remove(pkey); subdict = dictByContainerIdx.get(keyContainerIdx); subdict.remove(pkey); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamSchemaInt16Table.java
public void updateSchemaInt16(MSSBamAuthorization Authorization, MSSBamSchemaInt16Buff Buff) { MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(Buff.getRequiredId()); MSSBamSchemaInt16Buff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updateSchemaInt16", "Existing record not found", "SchemaInt16", pkey); }/*from ww w . j a va2 s. co m*/ MSSBamSchemaInt16ByContainerIdxKey existingKeyContainerIdx = schema.getFactorySchemaInt16() .newContainerIdxKey(); existingKeyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId()); MSSBamSchemaInt16ByContainerIdxKey newKeyContainerIdx = schema.getFactorySchemaInt16().newContainerIdxKey(); newKeyContainerIdx.setRequiredContainerId(Buff.getRequiredContainerId()); // Check unique indexes // Validate foreign keys { boolean allNull = true; if (allNull) { if (null == schema.getTableInt16Def().readDerivedByIdIdx(Authorization, Buff.getRequiredId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updateSchemaInt16", "Superclass", "SuperClass", "Int16Def", null); } } } { boolean allNull = true; if (allNull) { if (null == schema.getTableSchemaDef().readDerivedByIdIdx(Authorization, Buff.getRequiredContainerId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updateSchemaInt16", "Container", "CSchema", "SchemaDef", null); } } } // Update is valid SortedMap<MSSBamAnyObjPKey, MSSBamSchemaInt16Buff> subdict; dictByPKey.remove(pkey); dictByPKey.put(pkey, Buff); subdict = dictByContainerIdx.get(existingKeyContainerIdx); if (subdict != null) { subdict.remove(pkey); } if (dictByContainerIdx.containsKey(newKeyContainerIdx)) { subdict = dictByContainerIdx.get(newKeyContainerIdx); } else { subdict = new TreeMap<MSSBamAnyObjPKey, MSSBamSchemaInt16Buff>(); dictByContainerIdx.put(newKeyContainerIdx, subdict); } subdict.put(pkey, Buff); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamSchemaInt16Table.java
public void deleteSchemaInt16(MSSBamAuthorization Authorization, MSSBamSchemaInt16Buff Buff) { final String S_ProcName = "MSSBamRamSchemaInt16Table.deleteSchemaInt16() "; MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(schema.nextAnyObjIdGen()); MSSBamSchemaInt16Buff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "deleteSchemaInt16", "Existing record not found", "SchemaInt16", pkey); }//from w w w . j av a 2 s . co m if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteSchemaInt16", pkey); } MSSBamSchemaInt16ByContainerIdxKey keyContainerIdx = schema.getFactorySchemaInt16().newContainerIdxKey(); keyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId()); // Validate reverse foreign keys // Delete is valid SortedMap<MSSBamAnyObjPKey, MSSBamSchemaInt16Buff> subdict; dictByPKey.remove(pkey); subdict = dictByContainerIdx.get(keyContainerIdx); subdict.remove(pkey); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamSchemaInt32Table.java
public void updateSchemaInt32(MSSBamAuthorization Authorization, MSSBamSchemaInt32Buff Buff) { MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(Buff.getRequiredId()); MSSBamSchemaInt32Buff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updateSchemaInt32", "Existing record not found", "SchemaInt32", pkey); }//from w ww . j a va 2 s . c o m MSSBamSchemaInt32ByContainerIdxKey existingKeyContainerIdx = schema.getFactorySchemaInt32() .newContainerIdxKey(); existingKeyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId()); MSSBamSchemaInt32ByContainerIdxKey newKeyContainerIdx = schema.getFactorySchemaInt32().newContainerIdxKey(); newKeyContainerIdx.setRequiredContainerId(Buff.getRequiredContainerId()); // Check unique indexes // Validate foreign keys { boolean allNull = true; if (allNull) { if (null == schema.getTableInt32Def().readDerivedByIdIdx(Authorization, Buff.getRequiredId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updateSchemaInt32", "Superclass", "SuperClass", "Int32Def", null); } } } { boolean allNull = true; if (allNull) { if (null == schema.getTableSchemaDef().readDerivedByIdIdx(Authorization, Buff.getRequiredContainerId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updateSchemaInt32", "Container", "CSchema", "SchemaDef", null); } } } // Update is valid SortedMap<MSSBamAnyObjPKey, MSSBamSchemaInt32Buff> subdict; dictByPKey.remove(pkey); dictByPKey.put(pkey, Buff); subdict = dictByContainerIdx.get(existingKeyContainerIdx); if (subdict != null) { subdict.remove(pkey); } if (dictByContainerIdx.containsKey(newKeyContainerIdx)) { subdict = dictByContainerIdx.get(newKeyContainerIdx); } else { subdict = new TreeMap<MSSBamAnyObjPKey, MSSBamSchemaInt32Buff>(); dictByContainerIdx.put(newKeyContainerIdx, subdict); } subdict.put(pkey, Buff); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamSchemaInt32Table.java
public void deleteSchemaInt32(MSSBamAuthorization Authorization, MSSBamSchemaInt32Buff Buff) { final String S_ProcName = "MSSBamRamSchemaInt32Table.deleteSchemaInt32() "; MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(schema.nextAnyObjIdGen()); MSSBamSchemaInt32Buff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "deleteSchemaInt32", "Existing record not found", "SchemaInt32", pkey); }/*from ww w . j a v a 2s .com*/ if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteSchemaInt32", pkey); } MSSBamSchemaInt32ByContainerIdxKey keyContainerIdx = schema.getFactorySchemaInt32().newContainerIdxKey(); keyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId()); // Validate reverse foreign keys // Delete is valid SortedMap<MSSBamAnyObjPKey, MSSBamSchemaInt32Buff> subdict; dictByPKey.remove(pkey); subdict = dictByContainerIdx.get(keyContainerIdx); subdict.remove(pkey); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamSchemaInt64Table.java
public void updateSchemaInt64(MSSBamAuthorization Authorization, MSSBamSchemaInt64Buff Buff) { MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(Buff.getRequiredId()); MSSBamSchemaInt64Buff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updateSchemaInt64", "Existing record not found", "SchemaInt64", pkey); }// w w w .ja va 2s . c o m MSSBamSchemaInt64ByContainerIdxKey existingKeyContainerIdx = schema.getFactorySchemaInt64() .newContainerIdxKey(); existingKeyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId()); MSSBamSchemaInt64ByContainerIdxKey newKeyContainerIdx = schema.getFactorySchemaInt64().newContainerIdxKey(); newKeyContainerIdx.setRequiredContainerId(Buff.getRequiredContainerId()); // Check unique indexes // Validate foreign keys { boolean allNull = true; if (allNull) { if (null == schema.getTableInt64Def().readDerivedByIdIdx(Authorization, Buff.getRequiredId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updateSchemaInt64", "Superclass", "SuperClass", "Int64Def", null); } } } { boolean allNull = true; if (allNull) { if (null == schema.getTableSchemaDef().readDerivedByIdIdx(Authorization, Buff.getRequiredContainerId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updateSchemaInt64", "Container", "CSchema", "SchemaDef", null); } } } // Update is valid SortedMap<MSSBamAnyObjPKey, MSSBamSchemaInt64Buff> subdict; dictByPKey.remove(pkey); dictByPKey.put(pkey, Buff); subdict = dictByContainerIdx.get(existingKeyContainerIdx); if (subdict != null) { subdict.remove(pkey); } if (dictByContainerIdx.containsKey(newKeyContainerIdx)) { subdict = dictByContainerIdx.get(newKeyContainerIdx); } else { subdict = new TreeMap<MSSBamAnyObjPKey, MSSBamSchemaInt64Buff>(); dictByContainerIdx.put(newKeyContainerIdx, subdict); } subdict.put(pkey, Buff); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamSchemaInt64Table.java
public void deleteSchemaInt64(MSSBamAuthorization Authorization, MSSBamSchemaInt64Buff Buff) { final String S_ProcName = "MSSBamRamSchemaInt64Table.deleteSchemaInt64() "; MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(schema.nextAnyObjIdGen()); MSSBamSchemaInt64Buff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "deleteSchemaInt64", "Existing record not found", "SchemaInt64", pkey); }// w w w . ja va 2 s .c o m if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteSchemaInt64", pkey); } MSSBamSchemaInt64ByContainerIdxKey keyContainerIdx = schema.getFactorySchemaInt64().newContainerIdxKey(); keyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId()); // Validate reverse foreign keys // Delete is valid SortedMap<MSSBamAnyObjPKey, MSSBamSchemaInt64Buff> subdict; dictByPKey.remove(pkey); subdict = dictByContainerIdx.get(keyContainerIdx); subdict.remove(pkey); }
From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamSchemaNmTokensTable.java
public void updateSchemaNmTokens(MSSBamAuthorization Authorization, MSSBamSchemaNmTokensBuff Buff) { MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(Buff.getRequiredId()); MSSBamSchemaNmTokensBuff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updateSchemaNmTokens", "Existing record not found", "SchemaNmTokens", pkey); }/* ww w.ja v a 2 s . c o m*/ MSSBamSchemaNmTokensByContainerIdxKey existingKeyContainerIdx = schema.getFactorySchemaNmTokens() .newContainerIdxKey(); existingKeyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId()); MSSBamSchemaNmTokensByContainerIdxKey newKeyContainerIdx = schema.getFactorySchemaNmTokens() .newContainerIdxKey(); newKeyContainerIdx.setRequiredContainerId(Buff.getRequiredContainerId()); // Check unique indexes // Validate foreign keys { boolean allNull = true; if (allNull) { if (null == schema.getTableNmTokensDef().readDerivedByIdIdx(Authorization, Buff.getRequiredId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updateSchemaNmTokens", "Superclass", "SuperClass", "NmTokensDef", null); } } } { boolean allNull = true; if (allNull) { if (null == schema.getTableSchemaDef().readDerivedByIdIdx(Authorization, Buff.getRequiredContainerId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updateSchemaNmTokens", "Container", "CSchema", "SchemaDef", null); } } } // Update is valid SortedMap<MSSBamAnyObjPKey, MSSBamSchemaNmTokensBuff> subdict; dictByPKey.remove(pkey); dictByPKey.put(pkey, Buff); subdict = dictByContainerIdx.get(existingKeyContainerIdx); if (subdict != null) { subdict.remove(pkey); } if (dictByContainerIdx.containsKey(newKeyContainerIdx)) { subdict = dictByContainerIdx.get(newKeyContainerIdx); } else { subdict = new TreeMap<MSSBamAnyObjPKey, MSSBamSchemaNmTokensBuff>(); dictByContainerIdx.put(newKeyContainerIdx, subdict); } subdict.put(pkey, Buff); }