Example usage for java.lang Long toString

List of usage examples for java.lang Long toString

Introduction

In this page you can find the example usage for java.lang Long toString.

Prototype

public String toString() 

Source Link

Document

Returns a String object representing this Long 's value.

Usage

From source file:com.shopzilla.publisher.service.CategorySearchService.java

public CatalogResponse categorySearch(Long categoryId, Integer numResults) {
    ProductSearchRequest productSearchRequest = new ProductSearchRequest();
    productSearchRequest.setApiKey(apiKey);
    productSearchRequest.setPublisherId(publisherId);
    productSearchRequest.setCategoryId(categoryId.toString());
    productSearchRequest.setNumResults(numResults);
    productSearchRequest.setShowAttributes(Boolean.TRUE);

    return restCatalogAPIClient.performSearch(productSearchRequest);
}

From source file:net.nelz.simplesm.test.ReadThroughMultiCacheTest.java

@Test
public void testMemcached() {
    final MemcachedClientIF cache = (MemcachedClientIF) context.getBean("memcachedClient");

    final List<String> keys = new ArrayList<String>();
    final Map<String, String> answerMap = new HashMap<String, String>();
    final Long now = new Date().getTime();
    final String alphabet = "abcdefghijklmnopqrstuvwxyz";
    for (int ix = 0; ix < 5; ix++) {
        final String key = alphabet.charAt(ix) + now.toString();
        final String value = alphabet.toUpperCase().charAt(ix) + "00000";
        cache.set(key, 30, value);/*from w  ww  .j  av  a  2 s.  c o m*/
        keys.add(key);
        answerMap.put(key, value);
    }

    final Map<String, Object> memcachedSez = cache.getBulk(keys);

    assertTrue(memcachedSez.equals(answerMap));

}

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccMssCF.CFAccMssCFBindAccountEntryTransferTenantId.java

public String expandBody(MssCFGenContext genContext) {
    final String S_ProcName = "CFAccMssCFBindAccountEntryTransferTenantId.expandBody() ";

    if (genContext == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext");
    }// ww  w .j  a  va2  s.  co  m

    ICFLibAnyObj genDef = genContext.getGenDef();
    if (genDef == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext.getGenDef()");
    }

    String ret;

    if (genDef instanceof ICFAccAccountEntryObj) {
        Long transferTenantId = ((ICFAccAccountEntryObj) genDef).getOptionalTransferTenantId();
        if (transferTenantId == null) {
            ret = null;
        } else {
            ret = transferTenantId.toString();
        }
    } else {
        throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody",
                "genContext.getGenDef()", genDef, "ICFAccAccountEntryObj");
    }

    return (ret);
}

From source file:com.hs.mail.imap.message.responder.FetchResponder.java

void composeUid(FetchResponse response) {
    Long uid = response.getUid();
    if (uid != null) {
        message("UID");
        message(uid.toString());
    }/*from   www  .j  a  v a  2  s  .  co  m*/
}

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccMssCF.CFAccMssCFBindAccountConfigEmpContactListId.java

public String expandBody(MssCFGenContext genContext) {
    final String S_ProcName = "CFAccMssCFBindAccountConfigEmpContactListId.expandBody() ";

    if (genContext == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext");
    }/*from   ww w. java 2s.c  o  m*/

    ICFLibAnyObj genDef = genContext.getGenDef();
    if (genDef == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext.getGenDef()");
    }

    String ret;

    if (genDef instanceof ICFAccAccountConfigObj) {
        Long empContactListId = ((ICFAccAccountConfigObj) genDef).getOptionalEmpContactListId();
        if (empContactListId == null) {
            ret = null;
        } else {
            ret = empContactListId.toString();
        }
    } else {
        throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody",
                "genContext.getGenDef()", genDef, "ICFAccAccountConfigObj");
    }

    return (ret);
}

From source file:net.sourceforge.msscodefactory.cfgcash.v2_0.CFGCashMssCF.CFGCashMssCFBindAccountEntryTransferTenantId.java

public String expandBody(MssCFGenContext genContext) {
    final String S_ProcName = "CFGCashMssCFBindAccountEntryTransferTenantId.expandBody() ";

    if (genContext == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext");
    }//from  ww  w  .j a va2s .c  om

    ICFLibAnyObj genDef = genContext.getGenDef();
    if (genDef == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext.getGenDef()");
    }

    String ret;

    if (genDef instanceof ICFGCashAccountEntryObj) {
        Long transferTenantId = ((ICFGCashAccountEntryObj) genDef).getOptionalTransferTenantId();
        if (transferTenantId == null) {
            ret = null;
        } else {
            ret = transferTenantId.toString();
        }
    } else {
        throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody",
                "genContext.getGenDef()", genDef, "ICFGCashAccountEntryObj");
    }

    return (ret);
}

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccMssCF.CFAccMssCFBindAccountEntryTransferAccountId.java

public String expandBody(MssCFGenContext genContext) {
    final String S_ProcName = "CFAccMssCFBindAccountEntryTransferAccountId.expandBody() ";

    if (genContext == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext");
    }//w  w w. ja v  a  2  s  .c  o m

    ICFLibAnyObj genDef = genContext.getGenDef();
    if (genDef == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext.getGenDef()");
    }

    String ret;

    if (genDef instanceof ICFAccAccountEntryObj) {
        Long transferAccountId = ((ICFAccAccountEntryObj) genDef).getOptionalTransferAccountId();
        if (transferAccountId == null) {
            ret = null;
        } else {
            ret = transferAccountId.toString();
        }
    } else {
        throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody",
                "genContext.getGenDef()", genDef, "ICFAccAccountEntryObj");
    }

    return (ret);
}

From source file:net.sourceforge.msscodefactory.cfgcash.v2_0.CFGCashMssCF.CFGCashMssCFBindAccountConfigEmpContactListId.java

public String expandBody(MssCFGenContext genContext) {
    final String S_ProcName = "CFGCashMssCFBindAccountConfigEmpContactListId.expandBody() ";

    if (genContext == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext");
    }//from w w w. j ava2  s .co m

    ICFLibAnyObj genDef = genContext.getGenDef();
    if (genDef == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext.getGenDef()");
    }

    String ret;

    if (genDef instanceof ICFGCashAccountConfigObj) {
        Long empContactListId = ((ICFGCashAccountConfigObj) genDef).getOptionalEmpContactListId();
        if (empContactListId == null) {
            ret = null;
        } else {
            ret = empContactListId.toString();
        }
    } else {
        throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody",
                "genContext.getGenDef()", genDef, "ICFGCashAccountConfigObj");
    }

    return (ret);
}

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccMssCF.CFAccMssCFBindAccountConfigCustContactListId.java

public String expandBody(MssCFGenContext genContext) {
    final String S_ProcName = "CFAccMssCFBindAccountConfigCustContactListId.expandBody() ";

    if (genContext == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext");
    }// ww w .jav  a  2 s. c o  m

    ICFLibAnyObj genDef = genContext.getGenDef();
    if (genDef == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext.getGenDef()");
    }

    String ret;

    if (genDef instanceof ICFAccAccountConfigObj) {
        Long custContactListId = ((ICFAccAccountConfigObj) genDef).getOptionalCustContactListId();
        if (custContactListId == null) {
            ret = null;
        } else {
            ret = custContactListId.toString();
        }
    } else {
        throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody",
                "genContext.getGenDef()", genDef, "ICFAccAccountConfigObj");
    }

    return (ret);
}

From source file:net.sourceforge.msscodefactory.cfacc.v2_0.CFAccMssCF.CFAccMssCFBindAccountConfigVendContactListId.java

public String expandBody(MssCFGenContext genContext) {
    final String S_ProcName = "CFAccMssCFBindAccountConfigVendContactListId.expandBody() ";

    if (genContext == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext");
    }//ww w.j a  va  2s. c o m

    ICFLibAnyObj genDef = genContext.getGenDef();
    if (genDef == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext.getGenDef()");
    }

    String ret;

    if (genDef instanceof ICFAccAccountConfigObj) {
        Long vendContactListId = ((ICFAccAccountConfigObj) genDef).getOptionalVendContactListId();
        if (vendContactListId == null) {
            ret = null;
        } else {
            ret = vendContactListId.toString();
        }
    } else {
        throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody",
                "genContext.getGenDef()", genDef, "ICFAccAccountConfigObj");
    }

    return (ret);
}