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.cfgcash.v2_0.CFGCashXMsgClient.CFGCashXMsgClientISOLanguageTable.java

public CFGCashISOLanguageBuff[] readAllDerived(CFGCashAuthorization Authorization) {
    final String S_ProcName = "readAllDerived";
    String rqst = CFGCashXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFGCashXMsgISOLanguageMessageFormatter.formatISOLanguageRqstReadAll("\n\t\t\t") + "\n"
            + CFGCashXMsgSchemaMessageFormatter.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 va  2s. c om
    CFGCashXMsgRspnHandler 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<CFGCashISOLanguagePKey, ICFGCashISOLanguageObj> sortedMap = (SortedMap<CFGCashISOLanguagePKey, ICFGCashISOLanguageObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFGCashISOLanguageBuff arr[] = new CFGCashISOLanguageBuff[sz];
    Iterator<ICFGCashISOLanguageObj> iter = sortedMap.values().iterator();
    ICFGCashISOLanguageObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFGCashISOLanguageObj) iter.next();
        arr[idx] = cur.getISOLanguageBuff();
    }
    return (arr);
}

From source file:net.sourceforge.msscodefactory.cfgcash.v2_0.CFGCashXMsgClient.CFGCashXMsgClientISOLanguageTable.java

public CFGCashISOLanguageBuff[] readDerivedByBaseIdx(CFGCashAuthorization Authorization,
        String argBaseLanguageCode) {
    final String S_ProcName = "readDerivedByBaseIdx";
    String rqst = CFGCashXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
            + "\n" + "\t" + CFGCashXMsgISOLanguageMessageFormatter
                    .formatISOLanguageRqstReadByBaseIdx("\n\t\t\t", argBaseLanguageCode)
            + "\n" + CFGCashXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    String rspn = schema.sendReceive(Authorization, rqst);
    if ((rspn == null) || (rspn.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
    }//from www.jav a  2  s .  c o m
    CFGCashXMsgRspnHandler 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<CFGCashISOLanguagePKey, ICFGCashISOLanguageObj> sortedMap = (SortedMap<CFGCashISOLanguagePKey, ICFGCashISOLanguageObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFGCashISOLanguageBuff arr[] = new CFGCashISOLanguageBuff[sz];
    Iterator<ICFGCashISOLanguageObj> iter = sortedMap.values().iterator();
    ICFGCashISOLanguageObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFGCashISOLanguageObj) iter.next();
        arr[idx] = cur.getISOLanguageBuff();
    }
    return (arr);
}

From source file:net.sourceforge.msscodefactory.cfgcash.v2_0.CFGCashXMsgClient.CFGCashXMsgClientISOLanguageTable.java

public CFGCashISOLanguageBuff[] readDerivedByCountryIdx(CFGCashAuthorization Authorization,
        Short argISOCountryId) {//www  .j  av  a 2  s .c  om
    final String S_ProcName = "readDerivedByCountryIdx";
    String rqst = CFGCashXMsgSchemaMessageFormatter.formatRqstXmlPreamble()
            + "\n" + "\t" + CFGCashXMsgISOLanguageMessageFormatter
                    .formatISOLanguageRqstReadByCountryIdx("\n\t\t\t", argISOCountryId)
            + "\n" + CFGCashXMsgSchemaMessageFormatter.formatRqstXmlPostamble();
    String rspn = schema.sendReceive(Authorization, rqst);
    if ((rspn == null) || (rspn.length() <= 0)) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), S_ProcName, 0, "rspn");
    }
    CFGCashXMsgRspnHandler 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<CFGCashISOLanguagePKey, ICFGCashISOLanguageObj> sortedMap = (SortedMap<CFGCashISOLanguagePKey, ICFGCashISOLanguageObj>) sortedMapObj;
    int sz = sortedMap.size();
    CFGCashISOLanguageBuff arr[] = new CFGCashISOLanguageBuff[sz];
    Iterator<ICFGCashISOLanguageObj> iter = sortedMap.values().iterator();
    ICFGCashISOLanguageObj cur;
    for (int idx = 0; idx < sz; idx++) {
        cur = (ICFGCashISOLanguageObj) iter.next();
        arr[idx] = cur.getISOLanguageBuff();
    }
    return (arr);
}

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

public CFAccISOLanguageBuff[] readDerivedByCountryIdx(CFAccAuthorization Authorization, Short ISOCountryId) {
    final String S_ProcName = "CFAccRamISOLanguage.readDerivedByCountryIdx() ";
    CFAccISOLanguageByCountryIdxKey key = schema.getFactoryISOLanguage().newCountryIdxKey();
    key.setOptionalISOCountryId(ISOCountryId);

    CFAccISOLanguageBuff[] recArray;//from www  .  j  av  a  2 s .  c om
    if (dictByCountryIdx.containsKey(key)) {
        SortedMap<CFAccISOLanguagePKey, CFAccISOLanguageBuff> subdictCountryIdx = dictByCountryIdx.get(key);
        recArray = new CFAccISOLanguageBuff[subdictCountryIdx.size()];
        Iterator<CFAccISOLanguageBuff> iter = subdictCountryIdx.values().iterator();
        int idx = 0;
        while (iter.hasNext()) {
            recArray[idx++] = iter.next();
        }
    } else {
        recArray = new CFAccISOLanguageBuff[0];
    }
    return (recArray);
}

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

public CFAstISOLanguageBuff[] readDerivedByCountryIdx(CFAstAuthorization Authorization, Short ISOCountryId) {
    final String S_ProcName = "CFAstRamISOLanguage.readDerivedByCountryIdx() ";
    CFAstISOLanguageByCountryIdxKey key = schema.getFactoryISOLanguage().newCountryIdxKey();
    key.setOptionalISOCountryId(ISOCountryId);

    CFAstISOLanguageBuff[] recArray;//  w  w  w. j a  v a2  s. co m
    if (dictByCountryIdx.containsKey(key)) {
        SortedMap<CFAstISOLanguagePKey, CFAstISOLanguageBuff> subdictCountryIdx = dictByCountryIdx.get(key);
        recArray = new CFAstISOLanguageBuff[subdictCountryIdx.size()];
        Iterator<CFAstISOLanguageBuff> iter = subdictCountryIdx.values().iterator();
        int idx = 0;
        while (iter.hasNext()) {
            recArray[idx++] = iter.next();
        }
    } else {
        recArray = new CFAstISOLanguageBuff[0];
    }
    return (recArray);
}

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

public CFAccAttachmentTagBuff[] readAllDerived(CFAccAuthorization Authorization) {
    final String S_ProcName = "readAllDerived";
    String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAccXMsgAttachmentTagMessageFormatter.formatAttachmentTagRqstReadAll("\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  2s  . co  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<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.cfacc.v2_0.CFAccXMsgClient.CFAccXMsgClientAttachmentTagTable.java

public CFAccAttachmentTagBuff[] readDerivedByTenantIdx(CFAccAuthorization Authorization, long argTenantId) {
    final String S_ProcName = "readDerivedByTenantIdx";
    String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAccXMsgAttachmentTagMessageFormatter.formatAttachmentTagRqstReadByTenantIdx("\n\t\t\t",
                    argTenantId)//  w  w w. j ava 2 s.c  o m
            + "\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<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.cfacc.v2_0.CFAccRam.CFAccRamISOTimezoneTable.java

public CFAccISOTimezoneBuff[] readDerivedByOffsetIdx(CFAccAuthorization Authorization, short TZHourOffset,
        short TZMinOffset) {
    final String S_ProcName = "CFAccRamISOTimezone.readDerivedByOffsetIdx() ";
    CFAccISOTimezoneByOffsetIdxKey key = schema.getFactoryISOTimezone().newOffsetIdxKey();
    key.setRequiredTZHourOffset(TZHourOffset);
    key.setRequiredTZMinOffset(TZMinOffset);

    CFAccISOTimezoneBuff[] recArray;//  ww w .j av a2  s .  co  m
    if (dictByOffsetIdx.containsKey(key)) {
        SortedMap<CFAccISOTimezonePKey, CFAccISOTimezoneBuff> subdictOffsetIdx = dictByOffsetIdx.get(key);
        recArray = new CFAccISOTimezoneBuff[subdictOffsetIdx.size()];
        Iterator<CFAccISOTimezoneBuff> iter = subdictOffsetIdx.values().iterator();
        int idx = 0;
        while (iter.hasNext()) {
            recArray[idx++] = iter.next();
        }
    } else {
        recArray = new CFAccISOTimezoneBuff[0];
    }
    return (recArray);
}

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

public CFAccISOTimezoneBuff[] readDerivedByIso8601Idx(CFAccAuthorization Authorization, String Iso8601) {
    final String S_ProcName = "CFAccRamISOTimezone.readDerivedByIso8601Idx() ";
    CFAccISOTimezoneByIso8601IdxKey key = schema.getFactoryISOTimezone().newIso8601IdxKey();
    key.setRequiredIso8601(Iso8601);// w w  w  . j  a  v a 2  s  .co  m

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

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

public CFAccAttachmentTagBuff[] readDerivedByAttIdx(CFAccAuthorization Authorization, long argTenantId,
        long argAttachmentId) {
    final String S_ProcName = "readDerivedByAttIdx";
    String rqst = CFAccXMsgSchemaMessageFormatter.formatRqstXmlPreamble() + "\n" + "\t"
            + CFAccXMsgAttachmentTagMessageFormatter.formatAttachmentTagRqstReadByAttIdx("\n\t\t\t",
                    argTenantId, argAttachmentId)
            + "\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  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<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);
}