本文整理了Java中com.day.cq.search.Query.setStart
方法的一些代码示例,展示了Query.setStart
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.setStart
方法的具体详情如下:
包路径:com.day.cq.search.Query
类名称:Query
方法名:setStart
暂无
代码示例来源:origin: Adobe-Consulting-Services/acs-aem-commons
@Override
default void setStart(final long start) {
unwrapQuery().setStart(start);
}
代码示例来源:origin: heervisscher/htl-examples
@Override
public Resource getResource(ResourceResolver resourceResolver, String path) {
log.info("In getResource {}", path);
String productId = StringUtils.substringBetween(path, "fp/", ".");
if (StringUtils.isNotBlank(productId)) {
log.info("Product id {}", productId);
Map<String, String> map = new HashMap<String, String>();
// create query description as hash map (simplest way, same as form post)
map.put("path", "/content/we-retail/us/en/products");
map.put("type", "cq:Page");
map.put("nodename", productId);
Query query = builder.createQuery(PredicateGroup.create(map), resourceResolver.adaptTo(Session.class));
query.setStart(0);
query.setHitsPerPage(1);
SearchResult result = query.getResult();
log.info("Query {}", result.getQueryStatement());
Iterator<Resource> it = result.getResources();
if (it != null && it.hasNext()) {
CustomResourceWrapper rw = new CustomResourceWrapper(it.next(), path);
log.info("In getResource, returning {}", rw.getPath());
return rw;
}
}
return null;
}
代码示例来源:origin: adobe/aem-core-wcm-components
query.setStart(resultsOffset);
内容来源于网络,如有侵权,请联系作者删除!