@Override
public Object execute(Query query) {
if (!isLimiting()) {
query.setPageRequest(pageable != null ? pageable : new SolrPageRequest(0, (int) count(query)));
return executeFind(query).getContent();
}
if (pageable == null && isLimiting()) {
return executeFind(query.setPageRequest(new SolrPageRequest(0, getLimit()))).getContent();
}
if (getLimit() > 0) {
if (pageable.getOffset() > getLimit()) {
return new PageImpl(java.util.Collections.emptyList(), pageable, getLimit());