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.gst.infrastructure.codes.service.CodeWritePlatformServiceJpaRepositoryImpl.java

private Code retrieveCodeBy(final Long codeId) {
    final Code code = this.codeRepository.findOne(codeId);
    if (code == null) {
        throw new CodeNotFoundException(codeId.toString());
    }//  w w  w  . j  a v a 2s  .c o  m
    return code;
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamMssCF.CFBamMssCFBindChainDefSchemaId.java

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

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

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

    String ret;

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

    return (ret);
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamMssCF.CFBamMssCFBindIndexDefSchemaId.java

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

    if (genContext == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext");
    }//from w w w .j  a va  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 ICFBamIndexObj) {
        Long defSchemaId = ((ICFBamIndexObj) genDef).getOptionalDefSchemaId();
        if (defSchemaId == null) {
            ret = null;
        } else {
            ret = defSchemaId.toString();
        }
    } else {
        throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody",
                "genContext.getGenDef()", genDef, "ICFBamIndexObj");
    }

    return (ret);
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamMssCF.CFBamMssCFBindParamDefSchemaId.java

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

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

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

    String ret;

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

    return (ret);
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamMssCF.CFBamMssCFBindRelationNarrowedId.java

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

    if (genContext == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext");
    }//from w  ww .j av 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 ICFBamRelationObj) {
        Long narrowedId = ((ICFBamRelationObj) genDef).getOptionalNarrowedId();
        if (narrowedId == null) {
            ret = null;
        } else {
            ret = narrowedId.toString();
        }
    } else {
        throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody",
                "genContext.getGenDef()", genDef, "ICFBamRelationObj");
    }

    return (ret);
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamMssCF.CFBamMssCFBindTableDefSchemaId.java

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

    if (genContext == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext");
    }/*  w  w  w  .  j a  v a 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 ICFBamTableObj) {
        Long defSchemaId = ((ICFBamTableObj) genDef).getOptionalDefSchemaId();
        if (defSchemaId == null) {
            ret = null;
        } else {
            ret = defSchemaId.toString();
        }
    } else {
        throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody",
                "genContext.getGenDef()", genDef, "ICFBamTableObj");
    }

    return (ret);
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamMssCF.CFBamMssCFBindValueDefSchemaId.java

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

    if (genContext == null) {
        throw CFLib.getDefaultExceptionFactory().newNullArgumentException(getClass(), "expandBody", 1,
                "genContext");
    }//w  w w  .  j  a  va2 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 ICFBamValueObj) {
        Long defSchemaId = ((ICFBamValueObj) genDef).getOptionalDefSchemaId();
        if (defSchemaId == null) {
            ret = null;
        } else {
            ret = defSchemaId.toString();
        }
    } else {
        throw CFLib.getDefaultExceptionFactory().newUnsupportedClassException(getClass(), "expandBody",
                "genContext.getGenDef()", genDef, "ICFBamValueObj");
    }

    return (ret);
}

From source file:org.businessmanager.service.security.UserServiceImpl.java

@Override
public int getNumberOfUsers(Map<SingularAttribute<User, ?>, Object> filterAttributes,
        boolean enableLikeSearch) {
    Long number = userDao.getCount(filterAttributes, enableLikeSearch);
    return Integer.parseInt(number.toString());
}

From source file:com.huake.saas.account.service.AccountService.java

/**
 * //from   www.  ja v a  2  s. c  o  m
 * @param id
 * @return
 */
private User findByidWithMemcached(Long id) {
    String key = MemcachedObjectType.TENANCY.getPrefix() + id.toString();
    System.out.println("zzzzzzzzzzzzzzz" + key + "zzzzzzzzzzzzzzz");
    String jsonString = memcachedClient.get(key);
    if (jsonString != null) {
        return jsonMapper.fromJson(jsonString, User.class);
    } else {
        User user = userDao.findOne(id);
        if (user != null) {
            jsonString = jsonMapper.toJson(user);
            memcachedClient.set(key, MemcachedObjectType.TENANCY.getExpiredTime(), jsonString);
        }
        return user;
    }
}

From source file:net.sourceforge.msscodefactory.cfbam.v2_7.CFBamMssCF.CFBamMssCFBindDelDepDefSchemaId.java

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

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

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

    String ret;

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

    return (ret);
}