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

public void deleteSchemaNmTokens(MSSBamAuthorization Authorization, MSSBamSchemaNmTokensBuff Buff) {
    final String S_ProcName = "MSSBamRamSchemaNmTokensTable.deleteSchemaNmTokens() ";
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();

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

    // Validate reverse foreign keys

    // Delete is valid

    SortedMap<MSSBamAnyObjPKey, MSSBamSchemaNmTokensBuff> subdict;

    dictByPKey.remove(pkey);

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

}

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

public void updateSchemaNmToken(MSSBamAuthorization Authorization, MSSBamSchemaNmTokenBuff Buff) {
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();
    pkey.setRequiredId(Buff.getRequiredId());
    MSSBamSchemaNmTokenBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(),
                "updateSchemaNmToken", "Existing record not found", "SchemaNmToken", pkey);
    }//from  w  w w  . ja  va2  s .c o m
    MSSBamSchemaNmTokenByContainerIdxKey existingKeyContainerIdx = schema.getFactorySchemaNmToken()
            .newContainerIdxKey();
    existingKeyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    MSSBamSchemaNmTokenByContainerIdxKey newKeyContainerIdx = schema.getFactorySchemaNmToken()
            .newContainerIdxKey();
    newKeyContainerIdx.setRequiredContainerId(Buff.getRequiredContainerId());

    // Check unique indexes

    // Validate foreign keys

    {
        boolean allNull = true;

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

    {
        boolean allNull = true;

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

    // Update is valid

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

}

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

public void deleteSchemaNmToken(MSSBamAuthorization Authorization, MSSBamSchemaNmTokenBuff Buff) {
    final String S_ProcName = "MSSBamRamSchemaNmTokenTable.deleteSchemaNmToken() ";
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();

    pkey.setRequiredId(schema.nextAnyObjIdGen());
    MSSBamSchemaNmTokenBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(),
                "deleteSchemaNmToken", "Existing record not found", "SchemaNmToken", pkey);
    }//from w  ww . ja  v a2s .c  om
    if (existing.getRequiredRevision() != Buff.getRequiredRevision()) {
        throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(),
                "deleteSchemaNmToken", pkey);
    }
    MSSBamSchemaNmTokenByContainerIdxKey keyContainerIdx = schema.getFactorySchemaNmToken()
            .newContainerIdxKey();
    keyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    // Validate reverse foreign keys

    // Delete is valid

    SortedMap<MSSBamAnyObjPKey, MSSBamSchemaNmTokenBuff> subdict;

    dictByPKey.remove(pkey);

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

}

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

public void updateSchemaNumber(MSSBamAuthorization Authorization, MSSBamSchemaNumberBuff Buff) {
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();
    pkey.setRequiredId(Buff.getRequiredId());
    MSSBamSchemaNumberBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(),
                "updateSchemaNumber", "Existing record not found", "SchemaNumber", pkey);
    }//from w ww  .j  ava2s.  c  o m
    MSSBamSchemaNumberByContainerIdxKey existingKeyContainerIdx = schema.getFactorySchemaNumber()
            .newContainerIdxKey();
    existingKeyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    MSSBamSchemaNumberByContainerIdxKey newKeyContainerIdx = schema.getFactorySchemaNumber()
            .newContainerIdxKey();
    newKeyContainerIdx.setRequiredContainerId(Buff.getRequiredContainerId());

    // Check unique indexes

    // Validate foreign keys

    {
        boolean allNull = true;

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

    {
        boolean allNull = true;

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

    // Update is valid

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

}

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

public void deleteSchemaNumber(MSSBamAuthorization Authorization, MSSBamSchemaNumberBuff Buff) {
    final String S_ProcName = "MSSBamRamSchemaNumberTable.deleteSchemaNumber() ";
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();

    pkey.setRequiredId(schema.nextAnyObjIdGen());
    MSSBamSchemaNumberBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(),
                "deleteSchemaNumber", "Existing record not found", "SchemaNumber", pkey);
    }/* ww  w .  j  a va2s . com*/
    if (existing.getRequiredRevision() != Buff.getRequiredRevision()) {
        throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteSchemaNumber",
                pkey);
    }
    MSSBamSchemaNumberByContainerIdxKey keyContainerIdx = schema.getFactorySchemaNumber().newContainerIdxKey();
    keyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    // Validate reverse foreign keys

    // Delete is valid

    SortedMap<MSSBamAnyObjPKey, MSSBamSchemaNumberBuff> subdict;

    dictByPKey.remove(pkey);

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

}

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

public void updateSchemaString(MSSBamAuthorization Authorization, MSSBamSchemaStringBuff Buff) {
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();
    pkey.setRequiredId(Buff.getRequiredId());
    MSSBamSchemaStringBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(),
                "updateSchemaString", "Existing record not found", "SchemaString", pkey);
    }/*w w  w  .  ja v  a  2s  .  com*/
    MSSBamSchemaStringByContainerIdxKey existingKeyContainerIdx = schema.getFactorySchemaString()
            .newContainerIdxKey();
    existingKeyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    MSSBamSchemaStringByContainerIdxKey newKeyContainerIdx = schema.getFactorySchemaString()
            .newContainerIdxKey();
    newKeyContainerIdx.setRequiredContainerId(Buff.getRequiredContainerId());

    // Check unique indexes

    // Validate foreign keys

    {
        boolean allNull = true;

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

    {
        boolean allNull = true;

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

    // Update is valid

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

}

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

public void deleteSchemaString(MSSBamAuthorization Authorization, MSSBamSchemaStringBuff Buff) {
    final String S_ProcName = "MSSBamRamSchemaStringTable.deleteSchemaString() ";
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();

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

    // Validate reverse foreign keys

    // Delete is valid

    SortedMap<MSSBamAnyObjPKey, MSSBamSchemaStringBuff> subdict;

    dictByPKey.remove(pkey);

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

}

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

public void updateSchemaText(MSSBamAuthorization Authorization, MSSBamSchemaTextBuff Buff) {
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();
    pkey.setRequiredId(Buff.getRequiredId());
    MSSBamSchemaTextBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "updateSchemaText",
                "Existing record not found", "SchemaText", pkey);
    }/*from   ww w  . ja va 2s . c o m*/
    MSSBamSchemaTextByContainerIdxKey existingKeyContainerIdx = schema.getFactorySchemaText()
            .newContainerIdxKey();
    existingKeyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    MSSBamSchemaTextByContainerIdxKey newKeyContainerIdx = schema.getFactorySchemaText().newContainerIdxKey();
    newKeyContainerIdx.setRequiredContainerId(Buff.getRequiredContainerId());

    // Check unique indexes

    // Validate foreign keys

    {
        boolean allNull = true;

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

    {
        boolean allNull = true;

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

    // Update is valid

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

}

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

public void deleteSchemaText(MSSBamAuthorization Authorization, MSSBamSchemaTextBuff Buff) {
    final String S_ProcName = "MSSBamRamSchemaTextTable.deleteSchemaText() ";
    MSSBamAnyObjPKey pkey = schema.getFactoryAnyObj().newPKey();

    pkey.setRequiredId(schema.nextAnyObjIdGen());
    MSSBamSchemaTextBuff existing = dictByPKey.get(pkey);
    if (existing == null) {
        throw CFLib.getDefaultExceptionFactory().newStaleCacheDetectedException(getClass(), "deleteSchemaText",
                "Existing record not found", "SchemaText", pkey);
    }// ww  w .j a va  2 s. c om
    if (existing.getRequiredRevision() != Buff.getRequiredRevision()) {
        throw CFLib.getDefaultExceptionFactory().newCollisionDetectedException(getClass(), "deleteSchemaText",
                pkey);
    }
    MSSBamSchemaTextByContainerIdxKey keyContainerIdx = schema.getFactorySchemaText().newContainerIdxKey();
    keyContainerIdx.setRequiredContainerId(existing.getRequiredContainerId());

    // Validate reverse foreign keys

    // Delete is valid

    SortedMap<MSSBamAnyObjPKey, MSSBamSchemaTextBuff> subdict;

    dictByPKey.remove(pkey);

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

}

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

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

    MSSBamSchemaTimestampByContainerIdxKey newKeyContainerIdx = schema.getFactorySchemaTimestamp()
            .newContainerIdxKey();
    newKeyContainerIdx.setRequiredContainerId(Buff.getRequiredContainerId());

    // Check unique indexes

    // Validate foreign keys

    {
        boolean allNull = true;

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

    {
        boolean allNull = true;

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

    // Update is valid

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

}