Example usage for com.liferay.portal.kernel.repository Repository search

List of usage examples for com.liferay.portal.kernel.repository Repository search

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.repository Repository search.

Prototype

public Hits search(SearchContext searchContext, Query query) throws SearchException;

Source Link

Usage

From source file:com.liferay.portlet.documentlibrary.service.impl.DLAppServiceImpl.java

License:Open Source License

public Hits search(long repositoryId, SearchContext searchContext, Query query) throws SearchException {

    try {/*from  w w  w  . jav  a 2 s  .  c o  m*/
        Repository repository = getRepository(repositoryId);

        return repository.search(searchContext, query);
    } catch (Exception e) {
        throw new SearchException(e);
    }
}