Example usage for com.liferay.portal.kernel.bean BeanPropertiesUtil getLongSilent

List of usage examples for com.liferay.portal.kernel.bean BeanPropertiesUtil getLongSilent

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.bean BeanPropertiesUtil getLongSilent.

Prototype

public static long getLongSilent(Object bean, String param) 

Source Link

Usage

From source file:com.liferay.alloy.mvc.AlloyPermission.java

License:Open Source License

protected static long getOwnerId(String className, long classPK) {
    BaseModel<?> baseModel = null;

    try {// ww w  . ja v  a2 s .com
        AlloyServiceInvoker alloyServiceInvoker = new AlloyServiceInvoker(className);

        baseModel = alloyServiceInvoker.fetchModel(classPK);
    } catch (Exception e) {
    }

    return BeanPropertiesUtil.getLongSilent(baseModel, "userId");
}