Example usage for com.liferay.portal.kernel.trash TrashHandler getContainerModelsCount

List of usage examples for com.liferay.portal.kernel.trash TrashHandler getContainerModelsCount

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.trash TrashHandler getContainerModelsCount.

Prototype

public int getContainerModelsCount(long classPK, long containerModelId) throws PortalException;

Source Link

Document

Returns the number of container models that are children of the parent container model identified by the container model ID.

Usage

From source file:com.liferay.trash.web.internal.display.context.TrashContainerModelDisplayContext.java

License:Open Source License

public int getContainerModelsCount() throws PortalException {
    if (_containerModelsCount != null) {
        return _containerModelsCount;
    }//from   w w  w .  ja v a2 s.  c  om

    int containerModelsCount = 0;

    TrashHandler trashHandler = getTrashHandler();

    if (trashHandler != null) {
        containerModelsCount = trashHandler.getContainerModelsCount(getClassPK(), getContainerModelId());
    }

    _containerModelsCount = containerModelsCount;

    return _containerModelsCount;
}