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

public CFAccContactBuff[] readDerivedByContTentIdx(CFAccAuthorization Authorization, long argTenantId) {
    final String S_ProcName = "readDerivedByContTentIdx";
    String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAccXMsgContactMessageFormatter.formatContactRqstReadByContTentIdx("\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");
    }/*from   ww w.j  a v a2  s  . 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<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);
}

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

public CFAccContactBuff[] readDerivedByTimezoneIdx(CFAccAuthorization Authorization, Short argISOTimezoneId) {
    final String S_ProcName = "readDerivedByTimezoneIdx";
    String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAccXMsgContactMessageFormatter.formatContactRqstReadByTimezoneIdx("\n\t\t\t", argISOTimezoneId)
            + "\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 .  jav a2s  .  com
    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);
}

From source file:net.sourceforge.msscodefactory.cfcrm.v2_0.CFCrmXMsgClient.CFCrmXMsgClientAttachmentTable.java

public CFCrmAttachmentBuff[] readAllDerived(CFCrmAuthorization Authorization) {
    final String S_ProcName = "readAllDerived";
    String rqst = CFCrmXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFCrmXMsgAttachmentMessageFormatter.formatAttachmentRqstReadAll("\n\t\t\t") + "\n"
            + CFCrmXMsgSchemaMessageFormatter.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.java 2s  . co  m*/
    CFCrmXMsgRspnHandler 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<CFCrmAttachmentPKey, ICFCrmAttachmentObj> sortedMap = (SortedMap<CFCrmAttachmentPKey, ICFCrmAttachmentObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFCrmAttachmentBuff arr[] = new CFCrmAttachmentBuff[sz];
    Iterator<ICFCrmAttachmentObj> iter = sortedMap.values().iterator();
    ICFCrmAttachmentObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFCrmAttachmentObj) iter.next();
        arr[idx] = cur.getAttachmentBuff();
    }
    return (arr);
}

From source file:net.sourceforge.msscodefactory.cfcrm.v2_0.CFCrmXMsgClient.CFCrmXMsgClientAttachmentTable.java

public CFCrmAttachmentBuff[] readDerivedByTenantIdx(CFCrmAuthorization Authorization, long argTenantId) {
    final String S_ProcName = "readDerivedByTenantIdx";
    String rqst = CFCrmXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFCrmXMsgAttachmentMessageFormatter.formatAttachmentRqstReadByTenantIdx("\n\t\t\t", argTenantId)
            + "\n" + CFCrmXMsgSchemaMessageFormatter.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 a v  a2  s.  c o  m*/
    CFCrmXMsgRspnHandler 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<CFCrmAttachmentPKey, ICFCrmAttachmentObj> sortedMap = (SortedMap<CFCrmAttachmentPKey, ICFCrmAttachmentObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFCrmAttachmentBuff arr[] = new CFCrmAttachmentBuff[sz];
    Iterator<ICFCrmAttachmentObj> iter = sortedMap.values().iterator();
    ICFCrmAttachmentObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFCrmAttachmentObj) iter.next();
        arr[idx] = cur.getAttachmentBuff();
    }
    return (arr);
}

From source file:net.sourceforge.msscodefactory.cfcrm.v2_0.CFCrmXMsgClient.CFCrmXMsgClientAttachmentTable.java

public CFCrmAttachmentBuff[] readDerivedByMimeTypeIdx(CFCrmAuthorization Authorization, Integer argMimeTypeId) {
    final String S_ProcName = "readDerivedByMimeTypeIdx";
    String rqst = CFCrmXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
            + "\n" + "\t" + CFCrmXMsgAttachmentMessageFormatter
                    .formatAttachmentRqstReadByMimeTypeIdx("\n\t\t\t", argMimeTypeId)
            + "\n" + CFCrmXMsgSchemaMessageFormatter.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 .ja v  a 2  s . c om
    CFCrmXMsgRspnHandler 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<CFCrmAttachmentPKey, ICFCrmAttachmentObj> sortedMap = (SortedMap<CFCrmAttachmentPKey, ICFCrmAttachmentObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFCrmAttachmentBuff arr[] = new CFCrmAttachmentBuff[sz];
    Iterator<ICFCrmAttachmentObj> iter = sortedMap.values().iterator();
    ICFCrmAttachmentObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFCrmAttachmentObj) iter.next();
        arr[idx] = cur.getAttachmentBuff();
    }
    return (arr);
}

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

public CFAccContactBuff[] readDerivedByContListIdx(CFAccAuthorization Authorization, long argTenantId,
        long argContactListId) {
    final String S_ProcName = "readDerivedByContListIdx";
    String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
            + "\n" + "\t" + CFAccXMsgContactMessageFormatter.formatContactRqstReadByContListIdx("\n\t\t\t",
                    argTenantId, argContactListId)
            + "\n" + CFAccXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    String rspn = schema.sendReceive(Authorization, rqst);
    if ((rspn == null) || (rspn.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
    }/*w  w  w .j  av  a 2  s  .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<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);
}

From source file:net.sourceforge.msscodefactory.cfcrm.v2_0.CFCrmXMsgClient.CFCrmXMsgClientAttachmentTable.java

public CFCrmAttachmentBuff[] readDerivedByContactIdx(CFCrmAuthorization Authorization, long argTenantId,
        long argContactId) {
    final String S_ProcName = "readDerivedByContactIdx";
    String rqst = CFCrmXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
            + "\n" + "\t" + CFCrmXMsgAttachmentMessageFormatter.formatAttachmentRqstReadByContactIdx("\n\t\t\t",
                    argTenantId, argContactId)
            + "\n" + CFCrmXMsgSchemaMessageFormatter.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 ava2s .  co m
    CFCrmXMsgRspnHandler 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<CFCrmAttachmentPKey, ICFCrmAttachmentObj> sortedMap = (SortedMap<CFCrmAttachmentPKey, ICFCrmAttachmentObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFCrmAttachmentBuff arr[] = new CFCrmAttachmentBuff[sz];
    Iterator<ICFCrmAttachmentObj> iter = sortedMap.values().iterator();
    ICFCrmAttachmentObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFCrmAttachmentObj) iter.next();
        arr[idx] = cur.getAttachmentBuff();
    }
    return (arr);
}

From source file:net.sourceforge.msscodefactory.cfcrm.v2_0.CFCrmRam.CFCrmRamSecFormTable.java

public CFCrmSecFormBuff[] readDerivedByClusterIdx(CFCrmAuthorization Authorization, long ClusterId) {
    final String S_ProcName = "CFCrmRamSecForm.readDerivedByClusterIdx() ";
    CFCrmSecFormByClusterIdxKey key = schema.getFactorySecForm().newClusterIdxKey();
    key.setRequiredClusterId(ClusterId);

    CFCrmSecFormBuff[] recArray;//from   w  w w  . j a  v  a2  s.  c  o m
    if (dictByClusterIdx.containsKey(key)) {
        SortedMap<CFCrmSecFormPKey, CFCrmSecFormBuff> subdictClusterIdx = dictByClusterIdx.get(key);
        recArray = new CFCrmSecFormBuff[subdictClusterIdx.size()];
        Iterator<CFCrmSecFormBuff> iter = subdictClusterIdx.values().iterator();
        int idx = 0;
        while (iter.hasNext()) {
            recArray[idx++] = iter.next();
        }
    } else {
        recArray = new CFCrmSecFormBuff[0];
    }
    return (recArray);
}

From source file:net.sourceforge.msscodefactory.cfcrm.v2_0.CFCrmRam.CFCrmRamSecFormTable.java

public CFCrmSecFormBuff[] readDerivedBySecAppIdx(CFCrmAuthorization Authorization, long ClusterId,
        int SecAppId) {
    final String S_ProcName = "CFCrmRamSecForm.readDerivedBySecAppIdx() ";
    CFCrmSecFormBySecAppIdxKey key = schema.getFactorySecForm().newSecAppIdxKey();
    key.setRequiredClusterId(ClusterId);
    key.setRequiredSecAppId(SecAppId);//from   www  .  ja v a2  s .  c om

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

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

public CFAstVoicemailConfBuff[] readDerivedByVMClusterIdx(CFAstAuthorization Authorization, long ClusterId) {
    final String S_ProcName = "CFAstRamVoicemailConf.readDerivedByVMClusterIdx() ";
    CFAstVoicemailConfByVMClusterIdxKey key = schema.getFactoryVoicemailConf().newVMClusterIdxKey();
    key.setRequiredClusterId(ClusterId);

    CFAstVoicemailConfBuff[] recArray;/*from  w w  w .  jav a  2 s  .  co m*/
    if (dictByVMClusterIdx.containsKey(key)) {
        SortedMap<CFAstConfigurationFilePKey, CFAstVoicemailConfBuff> subdictVMClusterIdx = dictByVMClusterIdx
                .get(key);
        recArray = new CFAstVoicemailConfBuff[subdictVMClusterIdx.size()];
        Iterator<CFAstVoicemailConfBuff> iter = subdictVMClusterIdx.values().iterator();
        int idx = 0;
        while (iter.hasNext()) {
            recArray[idx++] = iter.next();
        }
    } else {
        recArray = new CFAstVoicemailConfBuff[0];
    }
    return (recArray);
}