Example usage for java.util SortedMap size

List of usage examples for java.util SortedMap size

Introduction

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

Prototype

int size();

Source Link

Document

Returns the number of key-value mappings in this map.

Usage

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccXMsgClient.CFAccXMsgClientAccountTable.java

public CFAccAccountBuff[] readDerivedByRollupAcctIdx(CFAccAuthorization Authorization, Long argRollupTenantId,
        Long argRollupAccountId) {
    final String S_ProcName = "readDerivedByRollupAcctIdx";
    String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAccXMsgAccountMessageFormatter.formatAccountRqstReadByRollupAcctIdx("\n\t\t\t",
                    argRollupTenantId, argRollupAccountId)
            + "\n" + CFAccXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    String rspn = schema.sendReceive(Authorization, rqst);
    if ((rspn == null) || (rspn.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
    }/*from   ww w . j a v  a 2  s  .  c  o  m*/
    CFAccXMsgRspnHandler responseHandler = schema.getResponseHandler();
    responseHandler.parseStringContents(rspn);
    CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
    if (exceptionRaised != null) {
        throw exceptionRaised;
    }
    Object sortedMapObj = responseHandler.getSortedMapOfObjects();
    if (sortedMapObj == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                "responseHandler.getSortedMapOfObjects");
    }
    SortedMap<CFAccAccountPKey, ICFAccAccountObj> sortedMap = (SortedMap<CFAccAccountPKey, ICFAccAccountObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFAccAccountBuff arr[] = new CFAccAccountBuff[sz];
    Iterator<ICFAccAccountObj> iter = sortedMap.values().iterator();
    ICFAccAccountObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFAccAccountObj) iter.next();
        arr[idx] = cur.getAccountBuff();
    }
    return (arr);
}

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccRam.CFAccRamSecSessionTable.java

public CFAccSecSessionBuff[] readDerivedBySecUserIdx(CFAccAuthorization Authorization, UUID SecUserId) {
    final String S_ProcName = "CFAccRamSecSession.readDerivedBySecUserIdx() ";
    CFAccSecSessionBySecUserIdxKey key = schema.getFactorySecSession().newSecUserIdxKey();
    key.setRequiredSecUserId(SecUserId);

    CFAccSecSessionBuff[] recArray;/*from www  . j a v  a 2s.c  om*/
    if (dictBySecUserIdx.containsKey(key)) {
        SortedMap<CFAccSecSessionPKey, CFAccSecSessionBuff> subdictSecUserIdx = dictBySecUserIdx.get(key);
        recArray = new CFAccSecSessionBuff[subdictSecUserIdx.size()];
        Iterator<CFAccSecSessionBuff> iter = subdictSecUserIdx.values().iterator();
        int idx = 0;
        while (iter.hasNext()) {
            recArray[idx++] = iter.next();
        }
    } else {
        recArray = new CFAccSecSessionBuff[0];
    }
    return (recArray);
}

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccRam.CFAccRamSecSessionTable.java

public CFAccSecSessionBuff[] readDerivedByFinishIdx(CFAccAuthorization Authorization, UUID SecUserId,
        Calendar Finish) {/*from www.j av  a  2s .co m*/
    final String S_ProcName = "CFAccRamSecSession.readDerivedByFinishIdx() ";
    CFAccSecSessionByFinishIdxKey key = schema.getFactorySecSession().newFinishIdxKey();
    key.setRequiredSecUserId(SecUserId);
    key.setOptionalFinish(Finish);

    CFAccSecSessionBuff[] recArray;
    if (dictByFinishIdx.containsKey(key)) {
        SortedMap<CFAccSecSessionPKey, CFAccSecSessionBuff> subdictFinishIdx = dictByFinishIdx.get(key);
        recArray = new CFAccSecSessionBuff[subdictFinishIdx.size()];
        Iterator<CFAccSecSessionBuff> iter = subdictFinishIdx.values().iterator();
        int idx = 0;
        while (iter.hasNext()) {
            recArray[idx++] = iter.next();
        }
    } else {
        recArray = new CFAccSecSessionBuff[0];
    }
    return (recArray);
}

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccXMsgClient.CFAccXMsgClientAddressTable.java

public CFAccAddressBuff[] readAllDerived(CFAccAuthorization Authorization) {
    final String S_ProcName = "readAllDerived";
    String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAccXMsgAddressMessageFormatter.formatAddressRqstReadAll("\n\t\t\t") + "\n"
            + CFAccXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    String rspn = schema.sendReceive(Authorization, rqst);
    if ((rspn == null) || (rspn.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
    }//from ww w  .j a v a 2  s  .  c  o m
    CFAccXMsgRspnHandler responseHandler = schema.getResponseHandler();
    responseHandler.parseStringContents(rspn);
    CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
    if (exceptionRaised != null) {
        throw exceptionRaised;
    }
    Object sortedMapObj = responseHandler.getSortedMapOfObjects();
    if (sortedMapObj == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                "responseHandler.getSortedMapOfObjects");
    }
    SortedMap<CFAccAddressPKey, ICFAccAddressObj> sortedMap = (SortedMap<CFAccAddressPKey, ICFAccAddressObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFAccAddressBuff arr[] = new CFAccAddressBuff[sz];
    Iterator<ICFAccAddressObj> iter = sortedMap.values().iterator();
    ICFAccAddressObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFAccAddressObj) iter.next();
        arr[idx] = cur.getAddressBuff();
    }
    return (arr);
}

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccXMsgClient.CFAccXMsgClientAddressTable.java

public CFAccAddressBuff[] readDerivedByTenantIdx(CFAccAuthorization Authorization, long argTenantId) {
    final String S_ProcName = "readDerivedByTenantIdx";
    String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAccXMsgAddressMessageFormatter.formatAddressRqstReadByTenantIdx("\n\t\t\t", argTenantId) + "\n"
            + CFAccXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    String rspn = schema.sendReceive(Authorization, rqst);
    if ((rspn == null) || (rspn.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
    }/* ww w  . jav a  2  s  .c o m*/
    CFAccXMsgRspnHandler responseHandler = schema.getResponseHandler();
    responseHandler.parseStringContents(rspn);
    CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
    if (exceptionRaised != null) {
        throw exceptionRaised;
    }
    Object sortedMapObj = responseHandler.getSortedMapOfObjects();
    if (sortedMapObj == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                "responseHandler.getSortedMapOfObjects");
    }
    SortedMap<CFAccAddressPKey, ICFAccAddressObj> sortedMap = (SortedMap<CFAccAddressPKey, ICFAccAddressObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFAccAddressBuff arr[] = new CFAccAddressBuff[sz];
    Iterator<ICFAccAddressObj> iter = sortedMap.values().iterator();
    ICFAccAddressObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFAccAddressObj) iter.next();
        arr[idx] = cur.getAddressBuff();
    }
    return (arr);
}

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccXMsgClient.CFAccXMsgClientAddressTable.java

public CFAccAddressBuff[] readDerivedByCountryIdx(CFAccAuthorization Authorization, Short argCountryId) {
    final String S_ProcName = "readDerivedByCountryIdx";
    String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAccXMsgAddressMessageFormatter.formatAddressRqstReadByCountryIdx("\n\t\t\t", argCountryId)
            + "\n" + CFAccXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    String rspn = schema.sendReceive(Authorization, rqst);
    if ((rspn == null) || (rspn.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
    }/*from  w ww .  j  a v a2s  . c om*/
    CFAccXMsgRspnHandler responseHandler = schema.getResponseHandler();
    responseHandler.parseStringContents(rspn);
    CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
    if (exceptionRaised != null) {
        throw exceptionRaised;
    }
    Object sortedMapObj = responseHandler.getSortedMapOfObjects();
    if (sortedMapObj == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                "responseHandler.getSortedMapOfObjects");
    }
    SortedMap<CFAccAddressPKey, ICFAccAddressObj> sortedMap = (SortedMap<CFAccAddressPKey, ICFAccAddressObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFAccAddressBuff arr[] = new CFAccAddressBuff[sz];
    Iterator<ICFAccAddressObj> iter = sortedMap.values().iterator();
    ICFAccAddressObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFAccAddressObj) iter.next();
        arr[idx] = cur.getAddressBuff();
    }
    return (arr);
}

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstRam.CFAstRamSecSessionTable.java

public CFAstSecSessionBuff[] readDerivedBySecUserIdx(CFAstAuthorization Authorization, UUID SecUserId) {
    final String S_ProcName = "CFAstRamSecSession.readDerivedBySecUserIdx() ";
    CFAstSecSessionBySecUserIdxKey key = schema.getFactorySecSession().newSecUserIdxKey();
    key.setRequiredSecUserId(SecUserId);

    CFAstSecSessionBuff[] recArray;//from w w w . j av  a2  s.  c o  m
    if (dictBySecUserIdx.containsKey(key)) {
        SortedMap<CFAstSecSessionPKey, CFAstSecSessionBuff> subdictSecUserIdx = dictBySecUserIdx.get(key);
        recArray = new CFAstSecSessionBuff[subdictSecUserIdx.size()];
        Iterator<CFAstSecSessionBuff> iter = subdictSecUserIdx.values().iterator();
        int idx = 0;
        while (iter.hasNext()) {
            recArray[idx++] = iter.next();
        }
    } else {
        recArray = new CFAstSecSessionBuff[0];
    }
    return (recArray);
}

From source file:net.sourceforge.msscodefactory.cfasterisk.v2_0.CFAstRam.CFAstRamSecSessionTable.java

public CFAstSecSessionBuff[] readDerivedByFinishIdx(CFAstAuthorization Authorization, UUID SecUserId,
        Calendar Finish) {/*  ww w  . j  av a 2s  .c  o m*/
    final String S_ProcName = "CFAstRamSecSession.readDerivedByFinishIdx() ";
    CFAstSecSessionByFinishIdxKey key = schema.getFactorySecSession().newFinishIdxKey();
    key.setRequiredSecUserId(SecUserId);
    key.setOptionalFinish(Finish);

    CFAstSecSessionBuff[] recArray;
    if (dictByFinishIdx.containsKey(key)) {
        SortedMap<CFAstSecSessionPKey, CFAstSecSessionBuff> subdictFinishIdx = dictByFinishIdx.get(key);
        recArray = new CFAstSecSessionBuff[subdictFinishIdx.size()];
        Iterator<CFAstSecSessionBuff> iter = subdictFinishIdx.values().iterator();
        int idx = 0;
        while (iter.hasNext()) {
            recArray[idx++] = iter.next();
        }
    } else {
        recArray = new CFAstSecSessionBuff[0];
    }
    return (recArray);
}

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccXMsgClient.CFAccXMsgClientAddressTable.java

public CFAccAddressBuff[] readDerivedByContactIdx(CFAccAuthorization Authorization, long argTenantId,
        long argContactId) {
    final String S_ProcName = "readDerivedByContactIdx";
    String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
            + "\n" + "\t" + CFAccXMsgAddressMessageFormatter.formatAddressRqstReadByContactIdx("\n\t\t\t",
                    argTenantId, argContactId)
            + "\n" + CFAccXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    String rspn = schema.sendReceive(Authorization, rqst);
    if ((rspn == null) || (rspn.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
    }/*ww  w  .j a  v  a2 s  .c o  m*/
    CFAccXMsgRspnHandler responseHandler = schema.getResponseHandler();
    responseHandler.parseStringContents(rspn);
    CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
    if (exceptionRaised != null) {
        throw exceptionRaised;
    }
    Object sortedMapObj = responseHandler.getSortedMapOfObjects();
    if (sortedMapObj == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                "responseHandler.getSortedMapOfObjects");
    }
    SortedMap<CFAccAddressPKey, ICFAccAddressObj> sortedMap = (SortedMap<CFAccAddressPKey, ICFAccAddressObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFAccAddressBuff arr[] = new CFAccAddressBuff[sz];
    Iterator<ICFAccAddressObj> iter = sortedMap.values().iterator();
    ICFAccAddressObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFAccAddressObj) iter.next();
        arr[idx] = cur.getAddressBuff();
    }
    return (arr);
}

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccXMsgClient.CFAccXMsgClientContactTable.java

public CFAccContactBuff[] readAllDerived(CFAccAuthorization Authorization) {
    final String S_ProcName = "readAllDerived";
    String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAccXMsgContactMessageFormatter.formatContactRqstReadAll("\n\t\t\t") + "\n"
            + CFAccXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    String rspn = schema.sendReceive(Authorization, rqst);
    if ((rspn == null) || (rspn.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
    }/*from   w w w .  j  av a  2  s. c o  m*/
    CFAccXMsgRspnHandler responseHandler = schema.getResponseHandler();
    responseHandler.parseStringContents(rspn);
    CFLibRuntimeException exceptionRaised = responseHandler.getExceptionRaised();
    if (exceptionRaised != null) {
        throw exceptionRaised;
    }
    Object sortedMapObj = responseHandler.getSortedMapOfObjects();
    if (sortedMapObj == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0,
                "responseHandler.getSortedMapOfObjects");
    }
    SortedMap<CFAccContactPKey, ICFAccContactObj> sortedMap = (SortedMap<CFAccContactPKey, ICFAccContactObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFAccContactBuff arr[] = new CFAccContactBuff[sz];
    Iterator<ICFAccContactObj> iter = sortedMap.values().iterator();
    ICFAccContactObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFAccContactObj) iter.next();
        arr[idx] = cur.getContactBuff();
    }
    return (arr);
}