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

public CFAccAttachmentTagBuff[] readDerivedByTagIdx(CFAccAuthorization Authorization, long argTenantId,
        long argTagId) {
    final String S_ProcName = "readDerivedByTagIdx";
    String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
            + "\n" + "\t" + CFAccXMsgAttachmentTagMessageFormatter
                    .formatAttachmentTagRqstReadByTagIdx("\n\t\t\t", argTenantId, argTagId)
            + "\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  a v  a  2s  . 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<CFAccAttachmentTagPKey, ICFAccAttachmentTagObj> sortedMap = (SortedMap<CFAccAttachmentTagPKey, ICFAccAttachmentTagObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFAccAttachmentTagBuff arr[] = new CFAccAttachmentTagBuff[sz];
    Iterator<ICFAccAttachmentTagObj> iter = sortedMap.values().iterator();
    ICFAccAttachmentTagObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFAccAttachmentTagObj) iter.next();
        arr[idx] = cur.getAttachmentTagBuff();
    }
    return (arr);
}

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

public CFAstISOTimezoneBuff[] readDerivedByOffsetIdx(CFAstAuthorization Authorization, short TZHourOffset,
        short TZMinOffset) {
    final String S_ProcName = "CFAstRamISOTimezone.readDerivedByOffsetIdx() ";
    CFAstISOTimezoneByOffsetIdxKey key = schema.getFactoryISOTimezone().newOffsetIdxKey();
    key.setRequiredTZHourOffset(TZHourOffset);
    key.setRequiredTZMinOffset(TZMinOffset);

    CFAstISOTimezoneBuff[] recArray;//from  w w  w.j  a v  a2  s .com
    if (dictByOffsetIdx.containsKey(key)) {
        SortedMap<CFAstISOTimezonePKey, CFAstISOTimezoneBuff> subdictOffsetIdx = dictByOffsetIdx.get(key);
        recArray = new CFAstISOTimezoneBuff[subdictOffsetIdx.size()];
        Iterator<CFAstISOTimezoneBuff> iter = subdictOffsetIdx.values().iterator();
        int idx = 0;
        while (iter.hasNext()) {
            recArray[idx++] = iter.next();
        }
    } else {
        recArray = new CFAstISOTimezoneBuff[0];
    }
    return (recArray);
}

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

public CFAstISOTimezoneBuff[] readDerivedByIso8601Idx(CFAstAuthorization Authorization, String Iso8601) {
    final String S_ProcName = "CFAstRamISOTimezone.readDerivedByIso8601Idx() ";
    CFAstISOTimezoneByIso8601IdxKey key = schema.getFactoryISOTimezone().newIso8601IdxKey();
    key.setRequiredIso8601(Iso8601);/*w w w  .j  av a  2s  .c  om*/

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

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

public CFAccHostNodeBuff[] readDerivedByClusterIdx(CFAccAuthorization Authorization, long ClusterId) {
    final String S_ProcName = "CFAccRamHostNode.readDerivedByClusterIdx() ";
    CFAccHostNodeByClusterIdxKey key = schema.getFactoryHostNode().newClusterIdxKey();
    key.setRequiredClusterId(ClusterId);

    CFAccHostNodeBuff[] recArray;/* w ww  . ja  va  2s  . co  m*/
    if (dictByClusterIdx.containsKey(key)) {
        SortedMap<CFAccHostNodePKey, CFAccHostNodeBuff> subdictClusterIdx = dictByClusterIdx.get(key);
        recArray = new CFAccHostNodeBuff[subdictClusterIdx.size()];
        Iterator<CFAccHostNodeBuff> iter = subdictClusterIdx.values().iterator();
        int idx = 0;
        while (iter.hasNext()) {
            recArray[idx++] = iter.next();
        }
    } else {
        recArray = new CFAccHostNodeBuff[0];
    }
    return (recArray);
}

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

public CFAccTopDomainBuff[] readDerivedByTLDIdx(CFAccAuthorization Authorization, long TenantId, long TLDId) {
    final String S_ProcName = "CFAccRamTopDomain.readDerivedByTLDIdx() ";
    CFAccTopDomainByTLDIdxKey key = schema.getFactoryTopDomain().newTLDIdxKey();
    key.setRequiredTenantId(TenantId);/* w  w w. ja v  a 2s .co  m*/
    key.setRequiredTLDId(TLDId);

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

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

public CFAccAccountContactBuff[] readAllDerived(CFAccAuthorization Authorization) {
    final String S_ProcName = "readAllDerived";
    String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAccXMsgAccountContactMessageFormatter.formatAccountContactRqstReadAll("\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");
    }//  ww w  .  java  2s.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<CFAccAccountContactPKey, ICFAccAccountContactObj> sortedMap = (SortedMap<CFAccAccountContactPKey, ICFAccAccountContactObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFAccAccountContactBuff arr[] = new CFAccAccountContactBuff[sz];
    Iterator<ICFAccAccountContactObj> iter = sortedMap.values().iterator();
    ICFAccAccountContactObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFAccAccountContactObj) iter.next();
        arr[idx] = cur.getAccountContactBuff();
    }
    return (arr);
}

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

public CFAstTopDomainBuff[] readDerivedByTLDIdx(CFAstAuthorization Authorization, long TenantId, long TLDId) {
    final String S_ProcName = "CFAstRamTopDomain.readDerivedByTLDIdx() ";
    CFAstTopDomainByTLDIdxKey key = schema.getFactoryTopDomain().newTLDIdxKey();
    key.setRequiredTenantId(TenantId);/*ww  w . j  a va  2  s . co m*/
    key.setRequiredTLDId(TLDId);

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

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

public CFAccDomainBuff[] readDerivedBySubDomIdx(CFAccAuthorization Authorization, long TenantId,
        long SubDomainOfId) {
    final String S_ProcName = "CFAccRamDomain.readDerivedBySubDomIdx() ";
    CFAccDomainBySubDomIdxKey key = schema.getFactoryDomain().newSubDomIdxKey();
    key.setRequiredTenantId(TenantId);/*from w w w  .java 2  s . c  om*/
    key.setRequiredSubDomainOfId(SubDomainOfId);

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

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

public CFAccAccountContactBuff[] readDerivedByTenantIdx(CFAccAuthorization Authorization, long argTenantId) {
    final String S_ProcName = "readDerivedByTenantIdx";
    String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAccXMsgAccountContactMessageFormatter.formatAccountContactRqstReadByTenantIdx("\n\t\t\t",
                    argTenantId)//from   w  ww . j  a v  a  2  s  .  c om
            + "\n" + CFAccXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    String rspn = schema.sendReceive(Authorization, rqst);
    if ((rspn == null) || (rspn.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
    }
    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<CFAccAccountContactPKey, ICFAccAccountContactObj> sortedMap = (SortedMap<CFAccAccountContactPKey, ICFAccAccountContactObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFAccAccountContactBuff arr[] = new CFAccAccountContactBuff[sz];
    Iterator<ICFAccAccountContactObj> iter = sortedMap.values().iterator();
    ICFAccAccountContactObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFAccAccountContactObj) iter.next();
        arr[idx] = cur.getAccountContactBuff();
    }
    return (arr);
}

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

public CFAstDomainBuff[] readDerivedBySubDomIdx(CFAstAuthorization Authorization, long TenantId,
        long SubDomainOfId) {
    final String S_ProcName = "CFAstRamDomain.readDerivedBySubDomIdx() ";
    CFAstDomainBySubDomIdxKey key = schema.getFactoryDomain().newSubDomIdxKey();
    key.setRequiredTenantId(TenantId);/* w  w w .  j a va 2  s.  c  om*/
    key.setRequiredSubDomainOfId(SubDomainOfId);

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