Example usage for com.liferay.portal.kernel.service OrganizationLocalServiceUtil searchCount

List of usage examples for com.liferay.portal.kernel.service OrganizationLocalServiceUtil searchCount

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.service OrganizationLocalServiceUtil searchCount.

Prototype

public static int searchCount(long companyId, long parentOrganizationId, String keywords, String type,
        Long regionId, Long countryId, java.util.LinkedHashMap<String, Object> params) 

Source Link

Document

Returns the number of organizations that match the keywords, type, region, and country.

Usage

From source file:com.liferay.site.admin.web.internal.display.context.SiteAdminDisplayContext.java

License:Open Source License

public int getOrganizationsCount(Group group) {
    LinkedHashMap<String, Object> organizationParams = new LinkedHashMap<>();

    ThemeDisplay themeDisplay = (ThemeDisplay) _request.getAttribute(WebKeys.THEME_DISPLAY);

    Company company = themeDisplay.getCompany();

    organizationParams.put("groupOrganization", group.getGroupId());
    organizationParams.put("organizationsGroups", group.getGroupId());

    return OrganizationLocalServiceUtil.searchCount(company.getCompanyId(),
            OrganizationConstants.ANY_PARENT_ORGANIZATION_ID, null, null, null, null, organizationParams);
}