List of usage examples for java.util SortedMap remove
V remove(Object key);
From source file:net.sourceforge.msscodefactory.v1_11.MSSBamRam.MSSBamRamManufactureToolSetTable.java
public void deleteManufactureToolSet(MSSBamAuthorization Authorization, MSSBamManufactureToolSetBuff Buff) { final String S_ProcName = "MSSBamRamManufactureToolSetTable.deleteManufactureToolSet() "; MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(schema.nextAnyObjIdGen()); MSSBamManufactureToolSetBuff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "deleteManufactureToolSet", "Existing record not found", "ManufactureToolSet", pkey); }//from w ww.j a v a 2 s . co m if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteManufactureToolSet", pkey); } MSSBamManufactureToolSetByUTSNameIdxKey keyUTSNameIdx = schema.getFactoryManufactureToolSet() .newUTSNameIdxKey(); keyUTSNameIdx.setRequiredManufacturedId(existing.getRequiredManufacturedId()); keyUTSNameIdx.setRequiredToolSetName(existing.getRequiredToolSetName()); MSSBamManufactureToolSetByManufacturedIdxKey keyManufacturedIdx = schema.getFactoryManufactureToolSet() .newManufacturedIdxKey(); keyManufacturedIdx.setRequiredManufacturedId(existing.getRequiredManufacturedId()); // Validate reverse foreign keys // Delete is valid SortedMap<MSSBamAnyObjPKey, MSSBamManufactureToolSetBuff> subdict; dictByPKey.remove(pkey); dictByUTSNameIdx.remove(keyUTSNameIdx); subdict = dictByManufacturedIdx.get(keyManufacturedIdx); subdict.remove(pkey); }
From source file:net.sourceforge.msscodefactory.v1_11.MSSBamRam.MSSBamRamPopDepTable.java
public void updatePopDep(MSSBamAuthorization Authorization, MSSBamPopDepBuff Buff) { MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(Buff.getRequiredId()); MSSBamPopDepBuff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updatePopDep", "Existing record not found", "PopDep", pkey); }//from w w w.j av a 2 s. c o m MSSBamPopDepByRelationIdxKey existingKeyRelationIdx = schema.getFactoryPopDep().newRelationIdxKey(); existingKeyRelationIdx.setRequiredRelationId(existing.getRequiredRelationId()); MSSBamPopDepByRelationIdxKey newKeyRelationIdx = schema.getFactoryPopDep().newRelationIdxKey(); newKeyRelationIdx.setRequiredRelationId(Buff.getRequiredRelationId()); // Check unique indexes // Validate foreign keys { boolean allNull = true; if (allNull) { if (null == schema.getTableScope().readDerivedByIdIdx(Authorization, Buff.getRequiredId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updatePopDep", "Superclass", "SuperClass", "Scope", null); } } } { boolean allNull = true; if (allNull) { if (null == schema.getTableRelation().readDerivedByIdIdx(Authorization, Buff.getRequiredRelationId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updatePopDep", "Lookup", "Relation", "Relation", null); } } } // Update is valid SortedMap<MSSBamAnyObjPKey, MSSBamPopDepBuff> subdict; dictByPKey.remove(pkey); dictByPKey.put(pkey, Buff); subdict = dictByRelationIdx.get(existingKeyRelationIdx); if (subdict != null) { subdict.remove(pkey); } if (dictByRelationIdx.containsKey(newKeyRelationIdx)) { subdict = dictByRelationIdx.get(newKeyRelationIdx); } else { subdict = new TreeMap<MSSBamAnyObjPKey, MSSBamPopDepBuff>(); dictByRelationIdx.put(newKeyRelationIdx, subdict); } subdict.put(pkey, Buff); }
From source file:net.sourceforge.msscodefactory.v1_11.MSSBamRam.MSSBamRamPopDepTable.java
public void deletePopDep(MSSBamAuthorization Authorization, MSSBamPopDepBuff Buff) { final String S_ProcName = "MSSBamRamPopDepTable.deletePopDep() "; MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(schema.nextAnyObjIdGen()); MSSBamPopDepBuff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "deletePopDep", "Existing record not found", "PopDep", pkey); }//from ww w .ja v a 2s .c o m if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deletePopDep", pkey); } MSSBamPopDepByRelationIdxKey keyRelationIdx = schema.getFactoryPopDep().newRelationIdxKey(); keyRelationIdx.setRequiredRelationId(existing.getRequiredRelationId()); // Validate reverse foreign keys if (schema.getTablePopTopDep().readDerivedByIdIdx(Authorization, existing.getRequiredId()) != null) { throw CFLib.getDefaultExceptionFactory().newDependentsDetectedException(getClass(), "deletePopDep", "Superclass", "SuperClass", "PopTopDep", pkey); } if (schema.getTablePopSubDep1().readDerivedByIdIdx(Authorization, existing.getRequiredId()) != null) { throw CFLib.getDefaultExceptionFactory().newDependentsDetectedException(getClass(), "deletePopDep", "Superclass", "SuperClass", "PopSubDep1", pkey); } if (schema.getTablePopSubDep2().readDerivedByIdIdx(Authorization, existing.getRequiredId()) != null) { throw CFLib.getDefaultExceptionFactory().newDependentsDetectedException(getClass(), "deletePopDep", "Superclass", "SuperClass", "PopSubDep2", pkey); } if (schema.getTablePopSubDep3().readDerivedByIdIdx(Authorization, existing.getRequiredId()) != null) { throw CFLib.getDefaultExceptionFactory().newDependentsDetectedException(getClass(), "deletePopDep", "Superclass", "SuperClass", "PopSubDep3", pkey); } // Delete is valid SortedMap<MSSBamAnyObjPKey, MSSBamPopDepBuff> subdict; dictByPKey.remove(pkey); subdict = dictByRelationIdx.get(keyRelationIdx); subdict.remove(pkey); }
From source file:net.sourceforge.msscodefactory.v1_11.MSSBamRam.MSSBamRamPopSubDep1Table.java
public void updatePopSubDep1(MSSBamAuthorization Authorization, MSSBamPopSubDep1Buff Buff) { MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(Buff.getRequiredId()); MSSBamPopSubDep1Buff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updatePopSubDep1", "Existing record not found", "PopSubDep1", pkey); }/* w ww . j ava2 s .co m*/ MSSBamPopSubDep1ByContPopTopIdxKey existingKeyContPopTopIdx = schema.getFactoryPopSubDep1() .newContPopTopIdxKey(); existingKeyContPopTopIdx.setRequiredContPopTopDepId(existing.getRequiredContPopTopDepId()); MSSBamPopSubDep1ByContPopTopIdxKey newKeyContPopTopIdx = schema.getFactoryPopSubDep1() .newContPopTopIdxKey(); newKeyContPopTopIdx.setRequiredContPopTopDepId(Buff.getRequiredContPopTopDepId()); // Check unique indexes // Validate foreign keys { boolean allNull = true; if (allNull) { if (null == schema.getTablePopDep().readDerivedByIdIdx(Authorization, Buff.getRequiredId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updatePopSubDep1", "Superclass", "SuperClass", "PopDep", null); } } } { boolean allNull = true; if (allNull) { if (null == schema.getTablePopTopDep().readDerivedByIdIdx(Authorization, Buff.getRequiredContPopTopDepId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updatePopSubDep1", "Container", "ContPopTopDep", "PopTopDep", null); } } } // Update is valid SortedMap<MSSBamAnyObjPKey, MSSBamPopSubDep1Buff> subdict; dictByPKey.remove(pkey); dictByPKey.put(pkey, Buff); subdict = dictByContPopTopIdx.get(existingKeyContPopTopIdx); if (subdict != null) { subdict.remove(pkey); } if (dictByContPopTopIdx.containsKey(newKeyContPopTopIdx)) { subdict = dictByContPopTopIdx.get(newKeyContPopTopIdx); } else { subdict = new TreeMap<MSSBamAnyObjPKey, MSSBamPopSubDep1Buff>(); dictByContPopTopIdx.put(newKeyContPopTopIdx, subdict); } subdict.put(pkey, Buff); }
From source file:net.sourceforge.msscodefactory.v1_11.MSSBamRam.MSSBamRamPopSubDep1Table.java
public void deletePopSubDep1(MSSBamAuthorization Authorization, MSSBamPopSubDep1Buff Buff) { final String S_ProcName = "MSSBamRamPopSubDep1Table.deletePopSubDep1() "; MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(schema.nextAnyObjIdGen()); MSSBamPopSubDep1Buff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "deletePopSubDep1", "Existing record not found", "PopSubDep1", pkey); }/*from w w w .jav a2 s. c o m*/ if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deletePopSubDep1", pkey); } MSSBamPopSubDep1ByContPopTopIdxKey keyContPopTopIdx = schema.getFactoryPopSubDep1().newContPopTopIdxKey(); keyContPopTopIdx.setRequiredContPopTopDepId(existing.getRequiredContPopTopDepId()); // Validate reverse foreign keys if (schema.getTablePopSubDep2().readDerivedByContPopDep1Idx(Authorization, existing.getRequiredId()).length > 0) { throw CFLib.getDefaultExceptionFactory().newDependentsDetectedException(getClass(), "deletePopSubDep1", "Container", "ContPopSubDep1", "PopSubDep2", pkey); } // Delete is valid SortedMap<MSSBamAnyObjPKey, MSSBamPopSubDep1Buff> subdict; dictByPKey.remove(pkey); subdict = dictByContPopTopIdx.get(keyContPopTopIdx); subdict.remove(pkey); }
From source file:net.sourceforge.msscodefactory.v1_11.MSSBamRam.MSSBamRamPopSubDep2Table.java
public void updatePopSubDep2(MSSBamAuthorization Authorization, MSSBamPopSubDep2Buff Buff) { MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(Buff.getRequiredId()); MSSBamPopSubDep2Buff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updatePopSubDep2", "Existing record not found", "PopSubDep2", pkey); }//from w w w.j av a2 s . com MSSBamPopSubDep2ByContPopDep1IdxKey existingKeyContPopDep1Idx = schema.getFactoryPopSubDep2() .newContPopDep1IdxKey(); existingKeyContPopDep1Idx.setRequiredContPopDep1Id(existing.getRequiredContPopDep1Id()); MSSBamPopSubDep2ByContPopDep1IdxKey newKeyContPopDep1Idx = schema.getFactoryPopSubDep2() .newContPopDep1IdxKey(); newKeyContPopDep1Idx.setRequiredContPopDep1Id(Buff.getRequiredContPopDep1Id()); // Check unique indexes // Validate foreign keys { boolean allNull = true; if (allNull) { if (null == schema.getTablePopDep().readDerivedByIdIdx(Authorization, Buff.getRequiredId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updatePopSubDep2", "Superclass", "SuperClass", "PopDep", null); } } } { boolean allNull = true; if (allNull) { if (null == schema.getTablePopSubDep1().readDerivedByIdIdx(Authorization, Buff.getRequiredContPopDep1Id())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updatePopSubDep2", "Container", "ContPopSubDep1", "PopSubDep1", null); } } } // Update is valid SortedMap<MSSBamAnyObjPKey, MSSBamPopSubDep2Buff> subdict; dictByPKey.remove(pkey); dictByPKey.put(pkey, Buff); subdict = dictByContPopDep1Idx.get(existingKeyContPopDep1Idx); if (subdict != null) { subdict.remove(pkey); } if (dictByContPopDep1Idx.containsKey(newKeyContPopDep1Idx)) { subdict = dictByContPopDep1Idx.get(newKeyContPopDep1Idx); } else { subdict = new TreeMap<MSSBamAnyObjPKey, MSSBamPopSubDep2Buff>(); dictByContPopDep1Idx.put(newKeyContPopDep1Idx, subdict); } subdict.put(pkey, Buff); }
From source file:net.sourceforge.msscodefactory.v1_11.MSSBamRam.MSSBamRamPopSubDep2Table.java
public void deletePopSubDep2(MSSBamAuthorization Authorization, MSSBamPopSubDep2Buff Buff) { final String S_ProcName = "MSSBamRamPopSubDep2Table.deletePopSubDep2() "; MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(schema.nextAnyObjIdGen()); MSSBamPopSubDep2Buff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "deletePopSubDep2", "Existing record not found", "PopSubDep2", pkey); }//from ww w . ja va 2 s. c o m if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deletePopSubDep2", pkey); } MSSBamPopSubDep2ByContPopDep1IdxKey keyContPopDep1Idx = schema.getFactoryPopSubDep2() .newContPopDep1IdxKey(); keyContPopDep1Idx.setRequiredContPopDep1Id(existing.getRequiredContPopDep1Id()); // Validate reverse foreign keys if (schema.getTablePopSubDep3().readDerivedByContPopDep2Idx(Authorization, existing.getRequiredId()).length > 0) { throw CFLib.getDefaultExceptionFactory().newDependentsDetectedException(getClass(), "deletePopSubDep2", "Container", "ContPopSubDep3", "PopSubDep3", pkey); } // Delete is valid SortedMap<MSSBamAnyObjPKey, MSSBamPopSubDep2Buff> subdict; dictByPKey.remove(pkey); subdict = dictByContPopDep1Idx.get(keyContPopDep1Idx); subdict.remove(pkey); }
From source file:net.sourceforge.msscodefactory.v1_11.MSSBamRam.MSSBamRamPopSubDep3Table.java
public void updatePopSubDep3(MSSBamAuthorization Authorization, MSSBamPopSubDep3Buff Buff) { MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(Buff.getRequiredId()); MSSBamPopSubDep3Buff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updatePopSubDep3", "Existing record not found", "PopSubDep3", pkey); }/* w w w . java2 s . c om*/ MSSBamPopSubDep3ByContPopDep2IdxKey existingKeyContPopDep2Idx = schema.getFactoryPopSubDep3() .newContPopDep2IdxKey(); existingKeyContPopDep2Idx.setRequiredContPopDep2Id(existing.getRequiredContPopDep2Id()); MSSBamPopSubDep3ByContPopDep2IdxKey newKeyContPopDep2Idx = schema.getFactoryPopSubDep3() .newContPopDep2IdxKey(); newKeyContPopDep2Idx.setRequiredContPopDep2Id(Buff.getRequiredContPopDep2Id()); // Check unique indexes // Validate foreign keys { boolean allNull = true; if (allNull) { if (null == schema.getTablePopDep().readDerivedByIdIdx(Authorization, Buff.getRequiredId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updatePopSubDep3", "Superclass", "SuperClass", "PopDep", null); } } } { boolean allNull = true; if (allNull) { if (null == schema.getTablePopSubDep2().readDerivedByIdIdx(Authorization, Buff.getRequiredContPopDep2Id())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updatePopSubDep3", "Container", "ContPopSubDep3", "PopSubDep2", null); } } } // Update is valid SortedMap<MSSBamAnyObjPKey, MSSBamPopSubDep3Buff> subdict; dictByPKey.remove(pkey); dictByPKey.put(pkey, Buff); subdict = dictByContPopDep2Idx.get(existingKeyContPopDep2Idx); if (subdict != null) { subdict.remove(pkey); } if (dictByContPopDep2Idx.containsKey(newKeyContPopDep2Idx)) { subdict = dictByContPopDep2Idx.get(newKeyContPopDep2Idx); } else { subdict = new TreeMap<MSSBamAnyObjPKey, MSSBamPopSubDep3Buff>(); dictByContPopDep2Idx.put(newKeyContPopDep2Idx, subdict); } subdict.put(pkey, Buff); }
From source file:net.sourceforge.msscodefactory.v1_11.MSSBamRam.MSSBamRamPopSubDep3Table.java
public void deletePopSubDep3(MSSBamAuthorization Authorization, MSSBamPopSubDep3Buff Buff) { final String S_ProcName = "MSSBamRamPopSubDep3Table.deletePopSubDep3() "; MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(schema.nextAnyObjIdGen()); MSSBamPopSubDep3Buff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "deletePopSubDep3", "Existing record not found", "PopSubDep3", pkey); }//from w w w . j a v a2 s.co m if (existing.getRequiredRevision() != Buff.getRequiredRevision()) { throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deletePopSubDep3", pkey); } MSSBamPopSubDep3ByContPopDep2IdxKey keyContPopDep2Idx = schema.getFactoryPopSubDep3() .newContPopDep2IdxKey(); keyContPopDep2Idx.setRequiredContPopDep2Id(existing.getRequiredContPopDep2Id()); // Validate reverse foreign keys // Delete is valid SortedMap<MSSBamAnyObjPKey, MSSBamPopSubDep3Buff> subdict; dictByPKey.remove(pkey); subdict = dictByContPopDep2Idx.get(keyContPopDep2Idx); subdict.remove(pkey); }
From source file:net.sourceforge.msscodefactory.v1_11.MSSBamRam.MSSBamRamPopTopDepTable.java
public void updatePopTopDep(MSSBamAuthorization Authorization, MSSBamPopTopDepBuff Buff) { MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey(); pkey.setRequiredId(Buff.getRequiredId()); MSSBamPopTopDepBuff existing = dictByPKey.get(pkey); if (existing == null) { throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updatePopTopDep", "Existing record not found", "PopTopDep", pkey); }//from w ww. jav a 2s . c om MSSBamPopTopDepByContRelIdxKey existingKeyContRelIdx = schema.getFactoryPopTopDep().newContRelIdxKey(); existingKeyContRelIdx.setRequiredContRelationId(existing.getRequiredContRelationId()); MSSBamPopTopDepByContRelIdxKey newKeyContRelIdx = schema.getFactoryPopTopDep().newContRelIdxKey(); newKeyContRelIdx.setRequiredContRelationId(Buff.getRequiredContRelationId()); // Check unique indexes // Validate foreign keys { boolean allNull = true; if (allNull) { if (null == schema.getTablePopDep().readDerivedByIdIdx(Authorization, Buff.getRequiredId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updatePopTopDep", "Superclass", "SuperClass", "PopDep", null); } } } { boolean allNull = true; if (allNull) { if (null == schema.getTableRelation().readDerivedByIdIdx(Authorization, Buff.getRequiredContRelationId())) { throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(), "updatePopTopDep", "Container", "ContRelation", "Relation", null); } } } // Update is valid SortedMap<MSSBamAnyObjPKey, MSSBamPopTopDepBuff> subdict; dictByPKey.remove(pkey); dictByPKey.put(pkey, Buff); subdict = dictByContRelIdx.get(existingKeyContRelIdx); if (subdict != null) { subdict.remove(pkey); } if (dictByContRelIdx.containsKey(newKeyContRelIdx)) { subdict = dictByContRelIdx.get(newKeyContRelIdx); } else { subdict = new TreeMap<MSSBamAnyObjPKey, MSSBamPopTopDepBuff>(); dictByContRelIdx.put(newKeyContRelIdx, subdict); } subdict.put(pkey, Buff); }