Example usage for com.liferay.portal.kernel.dao.search SearchContainer getTotal

List of usage examples for com.liferay.portal.kernel.dao.search SearchContainer getTotal

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.dao.search SearchContainer getTotal.

Prototype

public int getTotal() 

Source Link

Usage

From source file:com.liferay.asset.categories.admin.web.internal.display.context.AssetCategoriesDisplayContext.java

License:Open Source License

public boolean isDisabledCategoriesManagementBar() throws PortalException {
    SearchContainer categoriesSearchContainer = getCategoriesSearchContainer();

    if (!isFlattenedNavigationAllowed() && (categoriesSearchContainer.getTotal() <= 0)) {

        return true;
    }//from  ww w  . j  a v a  2  s  . c  om

    return false;
}

From source file:com.liferay.asset.categories.admin.web.internal.display.context.AssetCategoriesDisplayContext.java

License:Open Source License

public boolean isDisabledVocabulariesManagementBar() throws PortalException {

    SearchContainer vocabulariesSearchContainer = getVocabulariesSearchContainer();

    if (vocabulariesSearchContainer.getTotal() <= 0) {
        return true;
    }// w w  w  .  j a  va  2  s. c om

    return false;
}

From source file:com.liferay.asset.categories.admin.web.internal.display.context.AssetCategoriesDisplayContext.java

License:Open Source License

public boolean isShowCategoriesSearch() throws PortalException {
    if (Validator.isNotNull(getKeywords())) {
        return true;
    }/*from   w w  w  . j a va 2  s  .  co  m*/

    SearchContainer categoriesSearchContainer = getCategoriesSearchContainer();

    if (categoriesSearchContainer.getTotal() > 0) {
        return true;
    }

    return false;
}

From source file:com.liferay.asset.categories.admin.web.internal.display.context.AssetCategoriesDisplayContext.java

License:Open Source License

public boolean isShowVocabulariesSearch() throws PortalException {
    if (Validator.isNotNull(getKeywords())) {
        return true;
    }/*w  w w  . ja  v  a2 s .  c o m*/

    SearchContainer vocabulariesSearchContainer = getVocabulariesSearchContainer();

    if (vocabulariesSearchContainer.getTotal() > 0) {
        return true;
    }

    return false;
}

From source file:com.liferay.asset.display.template.web.internal.display.context.AssetDisplayTemplateDisplayContext.java

License:Open Source License

public boolean isDisabledManagementBar() throws PortalException {
    SearchContainer searchContainer = getSearchContainer();

    if (searchContainer.getTotal() <= 0) {
        return true;
    }/*w  ww  .j a  va 2s  .c o m*/

    return false;
}

From source file:com.liferay.asset.tags.admin.web.internal.display.context.AssetTagsDisplayContext.java

License:Open Source License

public boolean isDisabledTagsManagementBar() throws PortalException {
    SearchContainer tagsSearchContainer = getTagsSearchContainer();

    if (tagsSearchContainer.getTotal() <= 0) {
        return true;
    }//ww w .  j a  v  a 2  s .co m

    return false;
}

From source file:com.liferay.asset.tags.admin.web.internal.display.context.AssetTagsDisplayContext.java

License:Open Source License

public boolean isShowTagsSearch() throws PortalException {
    if (Validator.isNotNull(getKeywords())) {
        return true;
    }//from  ww  w.jav a  2 s. co m

    SearchContainer tagsSearchContainer = getTagsSearchContainer();

    if (tagsSearchContainer.getTotal() > 0) {
        return true;
    }

    return false;
}

From source file:com.liferay.dynamic.data.mapping.form.web.internal.display.context.DDMFormAdminDisplayContext.java

License:Open Source License

protected int getTotal() throws PortalException {
    SearchContainer<?> searchContainer = getSearch();

    return searchContainer.getTotal();
}

From source file:com.liferay.journal.web.internal.display.context.JournalDisplayContext.java

License:Open Source License

public int getCommentsTotal() throws PortalException {
    SearchContainer<MBMessage> commentsSearchContainer = getCommentsSearchContainer();

    return commentsSearchContainer.getTotal();
}

From source file:com.liferay.journal.web.internal.display.context.JournalDisplayContext.java

License:Open Source License

public int getTotal() throws PortalException {
    SearchContainer articleSearch = getSearchContainer(false);

    return articleSearch.getTotal();
}