/**
* {@inheritDoc}
*/
@Override
public Results executeQuery(StoreQuery query) {
Criteria c = query.getCriteria();
List<AggregatorInstance<?>> aggregators = query.getAggregatorInstances();
boolean includeResults = query.requestsKeys() || query.requestsValues() || !query.requestedAttributes().isEmpty();
ArrayList<Result> results = new ArrayList<Result>();
boolean hasOrder = !query.getOrdering().isEmpty();
boolean anyMatches = false;
for (Element element : elementSet()) {
if (!hasOrder && query.maxResults() >= 0 && results.size() == query.maxResults()) {
break;
}
if (element.getObjectValue() instanceof SoftLock) {
continue;
}
if (c.execute(element, attributeExtractors)) {
anyMatches = true;
if (includeResults) {
final Map<String, Object> attributes;
if (query.requestedAttributes().isEmpty()) {