Search in sources :

Example 26 with HstQuery

use of org.hippoecm.hst.content.beans.query.HstQuery in project hippo by NHS-digital-website.

the class FolderComponent method findAllDocuments.

private HippoBeanIterator findAllDocuments(HippoBean scope) throws QueryException {
    HstQueryBuilder queryBuilder = HstQueryBuilder.create(scope);
    HstQuery hstQuery = queryBuilder.ofTypes(Publication.class, Series.class, Dataset.class, LegacyPublication.class).limit(20).offset(0).build();
    return hstQuery.execute().getHippoBeans();
}
Also used : HstQuery(org.hippoecm.hst.content.beans.query.HstQuery) LegacyPublication(uk.nhs.digital.ps.beans.LegacyPublication) Series(uk.nhs.digital.ps.beans.Series) HstQueryBuilder(org.hippoecm.hst.content.beans.query.builder.HstQueryBuilder) Dataset(uk.nhs.digital.ps.beans.Dataset) LegacyPublication(uk.nhs.digital.ps.beans.LegacyPublication) Publication(uk.nhs.digital.ps.beans.Publication)

Aggregations

HstQuery (org.hippoecm.hst.content.beans.query.HstQuery)26 HstRequestContext (org.hippoecm.hst.core.request.HstRequestContext)18 QueryException (org.hippoecm.hst.content.beans.query.exceptions.QueryException)15 HstQueryResult (org.hippoecm.hst.content.beans.query.HstQueryResult)12 HippoBean (org.hippoecm.hst.content.beans.standard.HippoBean)7 HstQueryBuilder (org.hippoecm.hst.content.beans.query.builder.HstQueryBuilder)4 Filter (org.hippoecm.hst.content.beans.query.filter.Filter)4 HippoBeanIterator (org.hippoecm.hst.content.beans.standard.HippoBeanIterator)4 Node (javax.jcr.Node)3 BaseFilter (org.hippoecm.hst.content.beans.query.filter.BaseFilter)3 ValueList (org.onehippo.forge.selection.hst.contentbean.ValueList)3 NodeIterator (javax.jcr.NodeIterator)2 RepositoryException (javax.jcr.RepositoryException)2 Query (javax.jcr.query.Query)2 QueryManager (javax.jcr.query.QueryManager)2 QueryResult (javax.jcr.query.QueryResult)2 GET (javax.ws.rs.GET)2 Path (javax.ws.rs.Path)2 ObjectBeanManagerException (org.hippoecm.hst.content.beans.ObjectBeanManagerException)2 ObjectConverter (org.hippoecm.hst.content.beans.manager.ObjectConverter)2