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

public void deleteSchemaTimestamp(MSSBamAuthorization Authorization, MSSBamSchemaTimestampBuff Buff) {
    final String S_ProcName = "MSSBamRamSchemaTimestampTable.deleteSchemaTimestamp() ";
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();

    pkey.setRequiredId(schema.nextAnyObjIdGen());
    MSSBamSchemaTimestampBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(),
                "deleteSchemaTimestamp", "Existing record not found", "SchemaTimestamp", pkey);
    }//from  w w w.ja  v  a  2  s. c  o m
    if (existing.getRequiredRevision() != Buff.getRequiredRevision()) {
        throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(),
                "deleteSchemaTimestamp", pkey);
    }
    MSSBamSchemaTimestampByContainerIdxKey keyContainerIdx = schema.getFactorySchemaTimestamp()
            .newContainerIdxKey();
    keyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    // Validate reverse foreign keys

    // Delete is valid

    SortedMap<MSSBamAnyObjPKey, MSSBamSchemaTimestampBuff> subdict;

    dictByPKey.remove(pkey);

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

}

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

public void updateSchemaTime(MSSBamAuthorization Authorization, MSSBamSchemaTimeBuff Buff) {
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();
    pkey.setRequiredId(Buff.getRequiredId());
    MSSBamSchemaTimeBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updateSchemaTime",
                "Existing record not found", "SchemaTime", pkey);
    }/*from   ww  w. j ava 2s.  co  m*/
    MSSBamSchemaTimeByContainerIdxKey existingKeyContainerIdx = schema.getFactorySchemaTime()
            .newContainerIdxKey();
    existingKeyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    MSSBamSchemaTimeByContainerIdxKey newKeyContainerIdx = schema.getFactorySchemaTime().newContainerIdxKey();
    newKeyContainerIdx.setRequiredContainerId(Buff.getRequiredContainerId());

    // Check unique indexes

    // Validate foreign keys

    {
        boolean allNull = true;

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

    {
        boolean allNull = true;

        if (allNull) {
            if (null == schema.getTableSchemaDef().readDerivedByIdIdx(Authorization,
                    Buff.getRequiredContainerId())) {
                throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(),
                        "updateSchemaTime", "Container", "CSchema", "SchemaDef", null);
            }
        }
    }

    // Update is valid

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

}

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

public void deleteSchemaTime(MSSBamAuthorization Authorization, MSSBamSchemaTimeBuff Buff) {
    final String S_ProcName = "MSSBamRamSchemaTimeTable.deleteSchemaTime() ";
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();

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

    // Validate reverse foreign keys

    // Delete is valid

    SortedMap<MSSBamAnyObjPKey, MSSBamSchemaTimeBuff> subdict;

    dictByPKey.remove(pkey);

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

}

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

public void updateSchemaToken(MSSBamAuthorization Authorization, MSSBamSchemaTokenBuff Buff) {
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();
    pkey.setRequiredId(Buff.getRequiredId());
    MSSBamSchemaTokenBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updateSchemaToken",
                "Existing record not found", "SchemaToken", pkey);
    }/*from www .  j  a  v  a  2s  .c  om*/
    MSSBamSchemaTokenByContainerIdxKey existingKeyContainerIdx = schema.getFactorySchemaToken()
            .newContainerIdxKey();
    existingKeyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    MSSBamSchemaTokenByContainerIdxKey newKeyContainerIdx = schema.getFactorySchemaToken().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(),
                        "updateSchemaToken", "Superclass", "SuperClass", "TokenDef", null);
            }
        }
    }

    {
        boolean allNull = true;

        if (allNull) {
            if (null == schema.getTableSchemaDef().readDerivedByIdIdx(Authorization,
                    Buff.getRequiredContainerId())) {
                throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(),
                        "updateSchemaToken", "Container", "CSchema", "SchemaDef", null);
            }
        }
    }

    // Update is valid

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

}

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

public void deleteSchemaToken(MSSBamAuthorization Authorization, MSSBamSchemaTokenBuff Buff) {
    final String S_ProcName = "MSSBamRamSchemaTokenTable.deleteSchemaToken() ";
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();

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

    // Validate reverse foreign keys

    // Delete is valid

    SortedMap<MSSBamAnyObjPKey, MSSBamSchemaTokenBuff> subdict;

    dictByPKey.remove(pkey);

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

}

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

public void updateSchemaTZDate(MSSBamAuthorization Authorization, MSSBamSchemaTZDateBuff Buff) {
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();
    pkey.setRequiredId(Buff.getRequiredId());
    MSSBamSchemaTZDateBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(),
                "updateSchemaTZDate", "Existing record not found", "SchemaTZDate", pkey);
    }/*from  w  ww . ja  v  a 2 s  . c  o  m*/
    MSSBamSchemaTZDateByContainerIdxKey existingKeyContainerIdx = schema.getFactorySchemaTZDate()
            .newContainerIdxKey();
    existingKeyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    MSSBamSchemaTZDateByContainerIdxKey newKeyContainerIdx = schema.getFactorySchemaTZDate()
            .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(),
                        "updateSchemaTZDate", "Superclass", "SuperClass", "TZDateDef", null);
            }
        }
    }

    {
        boolean allNull = true;

        if (allNull) {
            if (null == schema.getTableSchemaDef().readDerivedByIdIdx(Authorization,
                    Buff.getRequiredContainerId())) {
                throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(),
                        "updateSchemaTZDate", "Container", "CSchema", "SchemaDef", null);
            }
        }
    }

    // Update is valid

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

}

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

public void deleteSchemaTZDate(MSSBamAuthorization Authorization, MSSBamSchemaTZDateBuff Buff) {
    final String S_ProcName = "MSSBamRamSchemaTZDateTable.deleteSchemaTZDate() ";
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();

    pkey.setRequiredId(schema.nextAnyObjIdGen());
    MSSBamSchemaTZDateBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(),
                "deleteSchemaTZDate", "Existing record not found", "SchemaTZDate", pkey);
    }//from  w  w w .jav a2  s  .  c o  m
    if (existing.getRequiredRevision() != Buff.getRequiredRevision()) {
        throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteSchemaTZDate",
                pkey);
    }
    MSSBamSchemaTZDateByContainerIdxKey keyContainerIdx = schema.getFactorySchemaTZDate().newContainerIdxKey();
    keyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    // Validate reverse foreign keys

    // Delete is valid

    SortedMap<MSSBamAnyObjPKey, MSSBamSchemaTZDateBuff> subdict;

    dictByPKey.remove(pkey);

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

}

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

public void updateSchemaTZTimestamp(MSSBamAuthorization Authorization, MSSBamSchemaTZTimestampBuff Buff) {
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();
    pkey.setRequiredId(Buff.getRequiredId());
    MSSBamSchemaTZTimestampBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(),
                "updateSchemaTZTimestamp", "Existing record not found", "SchemaTZTimestamp", pkey);
    }/*ww  w. ja v  a2  s . c  om*/
    MSSBamSchemaTZTimestampByContainerIdxKey existingKeyContainerIdx = schema.getFactorySchemaTZTimestamp()
            .newContainerIdxKey();
    existingKeyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    MSSBamSchemaTZTimestampByContainerIdxKey newKeyContainerIdx = schema.getFactorySchemaTZTimestamp()
            .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(),
                        "updateSchemaTZTimestamp", "Superclass", "SuperClass", "TZTimestampDef", null);
            }
        }
    }

    {
        boolean allNull = true;

        if (allNull) {
            if (null == schema.getTableSchemaDef().readDerivedByIdIdx(Authorization,
                    Buff.getRequiredContainerId())) {
                throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(),
                        "updateSchemaTZTimestamp", "Container", "CSchema", "SchemaDef", null);
            }
        }
    }

    // Update is valid

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

}

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

public void deleteSchemaTZTimestamp(MSSBamAuthorization Authorization, MSSBamSchemaTZTimestampBuff Buff) {
    final String S_ProcName = "MSSBamRamSchemaTZTimestampTable.deleteSchemaTZTimestamp() ";
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();

    pkey.setRequiredId(schema.nextAnyObjIdGen());
    MSSBamSchemaTZTimestampBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(),
                "deleteSchemaTZTimestamp", "Existing record not found", "SchemaTZTimestamp", pkey);
    }//from  w  w w . j a va 2  s . co  m
    if (existing.getRequiredRevision() != Buff.getRequiredRevision()) {
        throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(),
                "deleteSchemaTZTimestamp", pkey);
    }
    MSSBamSchemaTZTimestampByContainerIdxKey keyContainerIdx = schema.getFactorySchemaTZTimestamp()
            .newContainerIdxKey();
    keyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    // Validate reverse foreign keys

    // Delete is valid

    SortedMap<MSSBamAnyObjPKey, MSSBamSchemaTZTimestampBuff> subdict;

    dictByPKey.remove(pkey);

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

}

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

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

    MSSBamSchemaTZTimeByContainerIdxKey newKeyContainerIdx = schema.getFactorySchemaTZTime()
            .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(),
                        "updateSchemaTZTime", "Superclass", "SuperClass", "TZTimeDef", null);
            }
        }
    }

    {
        boolean allNull = true;

        if (allNull) {
            if (null == schema.getTableSchemaDef().readDerivedByIdIdx(Authorization,
                    Buff.getRequiredContainerId())) {
                throw CFLib.getDefaultExceptionFactory().newUnresolvedRelationException(getClass(),
                        "updateSchemaTZTime", "Container", "CSchema", "SchemaDef", null);
            }
        }
    }

    // Update is valid

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

}