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.MSSBamRamTableTimeTable.java

public void deleteTableTime(MSSBamAuthorization Authorization, MSSBamTableTimeBuff Buff) {
    final String S_ProcName = "MSSBamRamTableTimeTable.deleteTableTime() ";
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();

    pkey.setRequiredId(schema.nextAnyObjIdGen());
    MSSBamTableTimeBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "deleteTableTime",
                "Existing record not found", "TableTime", pkey);
    }//from   www.  jav  a  2  s.c  om
    if (existing.getRequiredRevision() != Buff.getRequiredRevision()) {
        throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteTableTime",
                pkey);
    }
    MSSBamTableTimeByContainerIdxKey keyContainerIdx = schema.getFactoryTableTime().newContainerIdxKey();
    keyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    // Validate reverse foreign keys

    // Delete is valid

    SortedMap<MSSBamAnyObjPKey, MSSBamTableTimeBuff> subdict;

    dictByPKey.remove(pkey);

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

}

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

public void updateTableToken(MSSBamAuthorization Authorization, MSSBamTableTokenBuff Buff) {
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();
    pkey.setRequiredId(Buff.getRequiredId());
    MSSBamTableTokenBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updateTableToken",
                "Existing record not found", "TableToken", pkey);
    }/*w ww .jav a2s. co  m*/
    MSSBamTableTokenByContainerIdxKey existingKeyContainerIdx = schema.getFactoryTableToken()
            .newContainerIdxKey();
    existingKeyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    MSSBamTableTokenByContainerIdxKey newKeyContainerIdx = schema.getFactoryTableToken().newContainerIdxKey();
    newKeyContainerIdx.setRequiredContainerId(Buff.getRequiredContainerId());

    // Check unique indexes

    // Validate foreign keys

    {
        boolean allNull = true;

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

    {
        boolean allNull = true;

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

    // Update is valid

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

}

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

public void deleteTableToken(MSSBamAuthorization Authorization, MSSBamTableTokenBuff Buff) {
    final String S_ProcName = "MSSBamRamTableTokenTable.deleteTableToken() ";
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();

    pkey.setRequiredId(schema.nextAnyObjIdGen());
    MSSBamTableTokenBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "deleteTableToken",
                "Existing record not found", "TableToken", pkey);
    }//from  w w w  .j av  a 2 s.c  o m
    if (existing.getRequiredRevision() != Buff.getRequiredRevision()) {
        throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteTableToken",
                pkey);
    }
    MSSBamTableTokenByContainerIdxKey keyContainerIdx = schema.getFactoryTableToken().newContainerIdxKey();
    keyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    // Validate reverse foreign keys

    // Delete is valid

    SortedMap<MSSBamAnyObjPKey, MSSBamTableTokenBuff> subdict;

    dictByPKey.remove(pkey);

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

}

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

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

    MSSBamTableTZDateByContainerIdxKey newKeyContainerIdx = schema.getFactoryTableTZDate().newContainerIdxKey();
    newKeyContainerIdx.setRequiredContainerId(Buff.getRequiredContainerId());

    // Check unique indexes

    // Validate foreign keys

    {
        boolean allNull = true;

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

    {
        boolean allNull = true;

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

    // Update is valid

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

}

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

public void deleteTableTZDate(MSSBamAuthorization Authorization, MSSBamTableTZDateBuff Buff) {
    final String S_ProcName = "MSSBamRamTableTZDateTable.deleteTableTZDate() ";
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();

    pkey.setRequiredId(schema.nextAnyObjIdGen());
    MSSBamTableTZDateBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "deleteTableTZDate",
                "Existing record not found", "TableTZDate", pkey);
    }/* ww  w. j av  a  2s .c  o  m*/
    if (existing.getRequiredRevision() != Buff.getRequiredRevision()) {
        throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteTableTZDate",
                pkey);
    }
    MSSBamTableTZDateByContainerIdxKey keyContainerIdx = schema.getFactoryTableTZDate().newContainerIdxKey();
    keyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    // Validate reverse foreign keys

    // Delete is valid

    SortedMap<MSSBamAnyObjPKey, MSSBamTableTZDateBuff> subdict;

    dictByPKey.remove(pkey);

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

}

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

public void updateTableTZTimestamp(MSSBamAuthorization Authorization, MSSBamTableTZTimestampBuff Buff) {
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();
    pkey.setRequiredId(Buff.getRequiredId());
    MSSBamTableTZTimestampBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(),
                "updateTableTZTimestamp", "Existing record not found", "TableTZTimestamp", pkey);
    }//ww w  .  j a  va 2 s .c o m
    MSSBamTableTZTimestampByContainerIdxKey existingKeyContainerIdx = schema.getFactoryTableTZTimestamp()
            .newContainerIdxKey();
    existingKeyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    MSSBamTableTZTimestampByContainerIdxKey newKeyContainerIdx = schema.getFactoryTableTZTimestamp()
            .newContainerIdxKey();
    newKeyContainerIdx.setRequiredContainerId(Buff.getRequiredContainerId());

    // Check unique indexes

    // Validate foreign keys

    {
        boolean allNull = true;

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

    {
        boolean allNull = true;

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

    // Update is valid

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

}

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

public void deleteTableTZTimestamp(MSSBamAuthorization Authorization, MSSBamTableTZTimestampBuff Buff) {
    final String S_ProcName = "MSSBamRamTableTZTimestampTable.deleteTableTZTimestamp() ";
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();

    pkey.setRequiredId(schema.nextAnyObjIdGen());
    MSSBamTableTZTimestampBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(),
                "deleteTableTZTimestamp", "Existing record not found", "TableTZTimestamp", pkey);
    }/*from w w  w. j a  va2  s .c o m*/
    if (existing.getRequiredRevision() != Buff.getRequiredRevision()) {
        throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(),
                "deleteTableTZTimestamp", pkey);
    }
    MSSBamTableTZTimestampByContainerIdxKey keyContainerIdx = schema.getFactoryTableTZTimestamp()
            .newContainerIdxKey();
    keyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    // Validate reverse foreign keys

    // Delete is valid

    SortedMap<MSSBamAnyObjPKey, MSSBamTableTZTimestampBuff> subdict;

    dictByPKey.remove(pkey);

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

}

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

public void updateTableTZTime(MSSBamAuthorization Authorization, MSSBamTableTZTimeBuff Buff) {
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();
    pkey.setRequiredId(Buff.getRequiredId());
    MSSBamTableTZTimeBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updateTableTZTime",
                "Existing record not found", "TableTZTime", pkey);
    }//from  w  w  w .  j a  v  a 2s  .c  o  m
    MSSBamTableTZTimeByContainerIdxKey existingKeyContainerIdx = schema.getFactoryTableTZTime()
            .newContainerIdxKey();
    existingKeyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    MSSBamTableTZTimeByContainerIdxKey newKeyContainerIdx = schema.getFactoryTableTZTime().newContainerIdxKey();
    newKeyContainerIdx.setRequiredContainerId(Buff.getRequiredContainerId());

    // Check unique indexes

    // Validate foreign keys

    {
        boolean allNull = true;

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

    {
        boolean allNull = true;

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

    // Update is valid

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

}

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

public void deleteTableTZTime(MSSBamAuthorization Authorization, MSSBamTableTZTimeBuff Buff) {
    final String S_ProcName = "MSSBamRamTableTZTimeTable.deleteTableTZTime() ";
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();

    pkey.setRequiredId(schema.nextAnyObjIdGen());
    MSSBamTableTZTimeBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "deleteTableTZTime",
                "Existing record not found", "TableTZTime", pkey);
    }//from  w  ww  .  j  a va2s  .co m
    if (existing.getRequiredRevision() != Buff.getRequiredRevision()) {
        throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteTableTZTime",
                pkey);
    }
    MSSBamTableTZTimeByContainerIdxKey keyContainerIdx = schema.getFactoryTableTZTime().newContainerIdxKey();
    keyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    // Validate reverse foreign keys

    // Delete is valid

    SortedMap<MSSBamAnyObjPKey, MSSBamTableTZTimeBuff> subdict;

    dictByPKey.remove(pkey);

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

}

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

public void updateTableUInt16(MSSBamAuthorization Authorization, MSSBamTableUInt16Buff Buff) {
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();
    pkey.setRequiredId(Buff.getRequiredId());
    MSSBamTableUInt16Buff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updateTableUInt16",
                "Existing record not found", "TableUInt16", pkey);
    }//w ww.  j  a  v a2  s  .c om
    MSSBamTableUInt16ByContainerIdxKey existingKeyContainerIdx = schema.getFactoryTableUInt16()
            .newContainerIdxKey();
    existingKeyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    MSSBamTableUInt16ByContainerIdxKey newKeyContainerIdx = schema.getFactoryTableUInt16().newContainerIdxKey();
    newKeyContainerIdx.setRequiredContainerId(Buff.getRequiredContainerId());

    // Check unique indexes

    // Validate foreign keys

    {
        boolean allNull = true;

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

    {
        boolean allNull = true;

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

    // Update is valid

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

}