Example usage for java.util SortedMap remove

List of usage examples for java.util SortedMap remove

Introduction

In this page you can find the example usage for java.util SortedMap remove.

Prototype

V remove(Object key);

Source Link

Document

Removes the mapping for a key from this map if it is present (optional operation).

Usage

From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamTableBlobTable.java

public void deleteTableBlob(MSSBamAuthorization Authorization, MSSBamTableBlobBuff Buff) {
    final String S_ProcName = "MSSBamRamTableBlobTable.deleteTableBlob() ";
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();

    pkey.setRequiredId(schema.nextAnyObjIdGen());
    MSSBamTableBlobBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "deleteTableBlob",
                "Existing record not found", "TableBlob", pkey);
    }/*from w ww  .  j av  a2s . c o  m*/
    if (existing.getRequiredRevision() != Buff.getRequiredRevision()) {
        throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteTableBlob",
                pkey);
    }
    MSSBamTableBlobByContainerIdxKey keyContainerIdx = schema.getFactoryTableBlob().newContainerIdxKey();
    keyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    // Validate reverse foreign keys

    // Delete is valid

    SortedMap<MSSBamAnyObjPKey, MSSBamTableBlobBuff> subdict;

    dictByPKey.remove(pkey);

    subdict = dictByContainerIdx.get(keyContainerIdx);
    subdict.remove(pkey);

}

From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamTableBoolTable.java

public void updateTableBool(MSSBamAuthorization Authorization, MSSBamTableBoolBuff Buff) {
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();
    pkey.setRequiredId(Buff.getRequiredId());
    MSSBamTableBoolBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updateTableBool",
                "Existing record not found", "TableBool", pkey);
    }/*from  w w  w .  j av  a  2s.c o  m*/
    MSSBamTableBoolByContainerIdxKey existingKeyContainerIdx = schema.getFactoryTableBool()
            .newContainerIdxKey();
    existingKeyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    MSSBamTableBoolByContainerIdxKey newKeyContainerIdx = schema.getFactoryTableBool().newContainerIdxKey();
    newKeyContainerIdx.setRequiredContainerId(Buff.getRequiredContainerId());

    // Check unique indexes

    // Validate foreign keys

    {
        boolean allNull = true;

        if (allNull) {
            if (null == schema.getTableBoolDef().readDerivedByIdIdx(Authorization, Buff.getRequiredId())) {
                throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(),
                        "updateTableBool", "Superclass", "SuperClass", "BoolDef", null);
            }
        }
    }

    {
        boolean allNull = true;

        if (allNull) {
            if (null == schema.getTableTable().readDerivedByIdIdx(Authorization,
                    Buff.getRequiredContainerId())) {
                throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(),
                        "updateTableBool", "Container", "CTable", "Table", null);
            }
        }
    }

    // Update is valid

    SortedMap<MSSBamAnyObjPKey, MSSBamTableBoolBuff> 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, MSSBamTableBoolBuff>();
        dictByContainerIdx.put(newKeyContainerIdx, subdict);
    }
    subdict.put(pkey, Buff);

}

From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamTableBoolTable.java

public void deleteTableBool(MSSBamAuthorization Authorization, MSSBamTableBoolBuff Buff) {
    final String S_ProcName = "MSSBamRamTableBoolTable.deleteTableBool() ";
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();

    pkey.setRequiredId(schema.nextAnyObjIdGen());
    MSSBamTableBoolBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "deleteTableBool",
                "Existing record not found", "TableBool", pkey);
    }//  w  w  w .  j a  v a  2  s. c  o m
    if (existing.getRequiredRevision() != Buff.getRequiredRevision()) {
        throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteTableBool",
                pkey);
    }
    MSSBamTableBoolByContainerIdxKey keyContainerIdx = schema.getFactoryTableBool().newContainerIdxKey();
    keyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    // Validate reverse foreign keys

    // Delete is valid

    SortedMap<MSSBamAnyObjPKey, MSSBamTableBoolBuff> subdict;

    dictByPKey.remove(pkey);

    subdict = dictByContainerIdx.get(keyContainerIdx);
    subdict.remove(pkey);

}

From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamTableColTable.java

public void updateTableCol(MSSBamAuthorization Authorization, MSSBamTableColBuff Buff) {
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();
    pkey.setRequiredId(Buff.getRequiredId());
    MSSBamTableColBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updateTableCol",
                "Existing record not found", "TableCol", pkey);
    }//from   w w w . jav  a2s.  c  o  m
    MSSBamTableColByCTableIdxKey existingKeyCTableIdx = schema.getFactoryTableCol().newCTableIdxKey();
    existingKeyCTableIdx.setRequiredTableId(existing.getRequiredTableId());

    MSSBamTableColByCTableIdxKey newKeyCTableIdx = schema.getFactoryTableCol().newCTableIdxKey();
    newKeyCTableIdx.setRequiredTableId(Buff.getRequiredTableId());

    MSSBamTableColByDataIdxKey existingKeyDataIdx = schema.getFactoryTableCol().newDataIdxKey();
    existingKeyDataIdx.setRequiredDataId(existing.getRequiredDataId());

    MSSBamTableColByDataIdxKey newKeyDataIdx = schema.getFactoryTableCol().newDataIdxKey();
    newKeyDataIdx.setRequiredDataId(Buff.getRequiredDataId());

    // Check unique indexes

    // Validate foreign keys

    {
        boolean allNull = true;

        if (allNull) {
            if (null == schema.getTableValue().readDerivedByIdIdx(Authorization, Buff.getRequiredId())) {
                throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(),
                        "updateTableCol", "Superclass", "SuperClass", "Value", null);
            }
        }
    }

    {
        boolean allNull = true;

        if (allNull) {
            if (null == schema.getTableAtomDef().readDerivedByIdIdx(Authorization, Buff.getRequiredDataId())) {
                throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(),
                        "updateTableCol", "Lookup", "Data", "AtomDef", null);
            }
        }
    }

    {
        boolean allNull = true;

        if (allNull) {
            if (null == schema.getTableTable().readDerivedByIdIdx(Authorization, Buff.getRequiredTableId())) {
                throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(),
                        "updateTableCol", "Container", "CTable", "Table", null);
            }
        }
    }

    // Update is valid

    SortedMap<MSSBamAnyObjPKey, MSSBamTableColBuff> subdict;

    dictByPKey.remove(pkey);
    dictByPKey.put(pkey, Buff);

    subdict = dictByCTableIdx.get(existingKeyCTableIdx);
    if (subdict != null) {
        subdict.remove(pkey);
    }
    if (dictByCTableIdx.containsKey(newKeyCTableIdx)) {
        subdict = dictByCTableIdx.get(newKeyCTableIdx);
    } else {
        subdict = new TreeMap<MSSBamAnyObjPKey, MSSBamTableColBuff>();
        dictByCTableIdx.put(newKeyCTableIdx, subdict);
    }
    subdict.put(pkey, Buff);

    subdict = dictByDataIdx.get(existingKeyDataIdx);
    if (subdict != null) {
        subdict.remove(pkey);
    }
    if (dictByDataIdx.containsKey(newKeyDataIdx)) {
        subdict = dictByDataIdx.get(newKeyDataIdx);
    } else {
        subdict = new TreeMap<MSSBamAnyObjPKey, MSSBamTableColBuff>();
        dictByDataIdx.put(newKeyDataIdx, subdict);
    }
    subdict.put(pkey, Buff);

}

From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamTableColTable.java

public void deleteTableCol(MSSBamAuthorization Authorization, MSSBamTableColBuff Buff) {
    final String S_ProcName = "MSSBamRamTableColTable.deleteTableCol() ";
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();

    pkey.setRequiredId(schema.nextAnyObjIdGen());
    MSSBamTableColBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "deleteTableCol",
                "Existing record not found", "TableCol", pkey);
    }//from  w w w . j a v a  2 s  .  c om
    if (existing.getRequiredRevision() != Buff.getRequiredRevision()) {
        throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteTableCol",
                pkey);
    }
    MSSBamTableColByCTableIdxKey keyCTableIdx = schema.getFactoryTableCol().newCTableIdxKey();
    keyCTableIdx.setRequiredTableId(existing.getRequiredTableId());

    MSSBamTableColByDataIdxKey keyDataIdx = schema.getFactoryTableCol().newDataIdxKey();
    keyDataIdx.setRequiredDataId(existing.getRequiredDataId());

    // Validate reverse foreign keys

    // Delete is valid

    SortedMap<MSSBamAnyObjPKey, MSSBamTableColBuff> subdict;

    dictByPKey.remove(pkey);

    subdict = dictByCTableIdx.get(keyCTableIdx);
    subdict.remove(pkey);

    subdict = dictByDataIdx.get(keyDataIdx);
    subdict.remove(pkey);

}

From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamTableDateTable.java

public void updateTableDate(MSSBamAuthorization Authorization, MSSBamTableDateBuff Buff) {
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();
    pkey.setRequiredId(Buff.getRequiredId());
    MSSBamTableDateBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updateTableDate",
                "Existing record not found", "TableDate", pkey);
    }/*from w w  w.ja va 2 s  .c om*/
    MSSBamTableDateByContainerIdxKey existingKeyContainerIdx = schema.getFactoryTableDate()
            .newContainerIdxKey();
    existingKeyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    MSSBamTableDateByContainerIdxKey newKeyContainerIdx = schema.getFactoryTableDate().newContainerIdxKey();
    newKeyContainerIdx.setRequiredContainerId(Buff.getRequiredContainerId());

    // Check unique indexes

    // Validate foreign keys

    {
        boolean allNull = true;

        if (allNull) {
            if (null == schema.getTableDateDef().readDerivedByIdIdx(Authorization, Buff.getRequiredId())) {
                throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(),
                        "updateTableDate", "Superclass", "SuperClass", "DateDef", null);
            }
        }
    }

    {
        boolean allNull = true;

        if (allNull) {
            if (null == schema.getTableTable().readDerivedByIdIdx(Authorization,
                    Buff.getRequiredContainerId())) {
                throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(),
                        "updateTableDate", "Container", "CTable", "Table", null);
            }
        }
    }

    // Update is valid

    SortedMap<MSSBamAnyObjPKey, MSSBamTableDateBuff> 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, MSSBamTableDateBuff>();
        dictByContainerIdx.put(newKeyContainerIdx, subdict);
    }
    subdict.put(pkey, Buff);

}

From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamTableDateTable.java

public void deleteTableDate(MSSBamAuthorization Authorization, MSSBamTableDateBuff Buff) {
    final String S_ProcName = "MSSBamRamTableDateTable.deleteTableDate() ";
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();

    pkey.setRequiredId(schema.nextAnyObjIdGen());
    MSSBamTableDateBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "deleteTableDate",
                "Existing record not found", "TableDate", pkey);
    }/*from  ww  w .j a  v a 2s.c  o m*/
    if (existing.getRequiredRevision() != Buff.getRequiredRevision()) {
        throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteTableDate",
                pkey);
    }
    MSSBamTableDateByContainerIdxKey keyContainerIdx = schema.getFactoryTableDate().newContainerIdxKey();
    keyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    // Validate reverse foreign keys

    // Delete is valid

    SortedMap<MSSBamAnyObjPKey, MSSBamTableDateBuff> subdict;

    dictByPKey.remove(pkey);

    subdict = dictByContainerIdx.get(keyContainerIdx);
    subdict.remove(pkey);

}

From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamTableDoubleTable.java

public void updateTableDouble(MSSBamAuthorization Authorization, MSSBamTableDoubleBuff Buff) {
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();
    pkey.setRequiredId(Buff.getRequiredId());
    MSSBamTableDoubleBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updateTableDouble",
                "Existing record not found", "TableDouble", pkey);
    }//from   w  ww .  j  ava2 s  .  com
    MSSBamTableDoubleByContainerIdxKey existingKeyContainerIdx = schema.getFactoryTableDouble()
            .newContainerIdxKey();
    existingKeyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    MSSBamTableDoubleByContainerIdxKey newKeyContainerIdx = schema.getFactoryTableDouble().newContainerIdxKey();
    newKeyContainerIdx.setRequiredContainerId(Buff.getRequiredContainerId());

    // Check unique indexes

    // Validate foreign keys

    {
        boolean allNull = true;

        if (allNull) {
            if (null == schema.getTableDoubleDef().readDerivedByIdIdx(Authorization, Buff.getRequiredId())) {
                throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(),
                        "updateTableDouble", "Superclass", "SuperClass", "DoubleDef", null);
            }
        }
    }

    {
        boolean allNull = true;

        if (allNull) {
            if (null == schema.getTableTable().readDerivedByIdIdx(Authorization,
                    Buff.getRequiredContainerId())) {
                throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(),
                        "updateTableDouble", "Container", "Table", "Table", null);
            }
        }
    }

    // Update is valid

    SortedMap<MSSBamAnyObjPKey, MSSBamTableDoubleBuff> 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, MSSBamTableDoubleBuff>();
        dictByContainerIdx.put(newKeyContainerIdx, subdict);
    }
    subdict.put(pkey, Buff);

}

From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamTableDoubleTable.java

public void deleteTableDouble(MSSBamAuthorization Authorization, MSSBamTableDoubleBuff Buff) {
    final String S_ProcName = "MSSBamRamTableDoubleTable.deleteTableDouble() ";
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();

    pkey.setRequiredId(schema.nextAnyObjIdGen());
    MSSBamTableDoubleBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "deleteTableDouble",
                "Existing record not found", "TableDouble", pkey);
    }//from  w ww.j a  v  a  2 s .  co m
    if (existing.getRequiredRevision() != Buff.getRequiredRevision()) {
        throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteTableDouble",
                pkey);
    }
    MSSBamTableDoubleByContainerIdxKey keyContainerIdx = schema.getFactoryTableDouble().newContainerIdxKey();
    keyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    // Validate reverse foreign keys

    // Delete is valid

    SortedMap<MSSBamAnyObjPKey, MSSBamTableDoubleBuff> subdict;

    dictByPKey.remove(pkey);

    subdict = dictByContainerIdx.get(keyContainerIdx);
    subdict.remove(pkey);

}

From source file:net.sourceforge.msscodefactory.v1_10.MSSBamRam.MSSBamRamTableEnumTable.java

public void updateTableEnum(MSSBamAuthorization Authorization, MSSBamTableEnumBuff Buff) {
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();
    pkey.setRequiredId(Buff.getRequiredId());
    MSSBamTableEnumBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updateTableEnum",
                "Existing record not found", "TableEnum", pkey);
    }// w ww.  ja v a2 s  .c o m
    MSSBamTableEnumByContainerIdxKey existingKeyContainerIdx = schema.getFactoryTableEnum()
            .newContainerIdxKey();
    existingKeyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    MSSBamTableEnumByContainerIdxKey newKeyContainerIdx = schema.getFactoryTableEnum().newContainerIdxKey();
    newKeyContainerIdx.setRequiredContainerId(Buff.getRequiredContainerId());

    // Check unique indexes

    // Validate foreign keys

    {
        boolean allNull = true;

        if (allNull) {
            if (null == schema.getTableEnumDef().readDerivedByIdIdx(Authorization, Buff.getRequiredId())) {
                throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(),
                        "updateTableEnum", "Superclass", "SuperClass", "EnumDef", null);
            }
        }
    }

    {
        boolean allNull = true;

        if (allNull) {
            if (null == schema.getTableTable().readDerivedByIdIdx(Authorization,
                    Buff.getRequiredContainerId())) {
                throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(),
                        "updateTableEnum", "Container", "CTable", "Table", null);
            }
        }
    }

    // Update is valid

    SortedMap<MSSBamAnyObjPKey, MSSBamTableEnumBuff> 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, MSSBamTableEnumBuff>();
        dictByContainerIdx.put(newKeyContainerIdx, subdict);
    }
    subdict.put(pkey, Buff);

}