all(); } else if (criteria instanceof And) { and(And.class.cast(criteria)); } else if (criteria instanceof Or) { or(Or.class.cast(criteria)); } else if (criteria instanceof Not) { processNotCriteria(Not.class.cast(criteria)); } else if (criteria instanceof NotEqualTo) { notEqualTerm(NotEqualTo.class.cast(criteria)); } else if (criteria instanceof NotILike) { notIlike(NotILike.class.cast(criteria)); } else if (criteria instanceof NotNull) { notNull(NotNull.class.cast(criteria)); } else if (criteria instanceof Between) { between(Between.class.cast(criteria)); } else if (criteria instanceof EqualTo) { equalTo(EqualTo.class.cast(criteria)); } else if (criteria instanceof IsNull) { isNull(IsNull.class.cast(criteria)); } else if (criteria instanceof ILike) { ilike(ILike.class.cast(criteria)); } else if (criteria instanceof GreaterThan) { greaterThan(GreaterThan.class.cast(criteria)); } else if (criteria instanceof GreaterThanOrEqual) { greaterThanEqual(GreaterThanOrEqual.class.cast(criteria)); } else if (criteria instanceof InCollection) { in(InCollection.class.cast(criteria)); } else if (criteria instanceof LessThan) { lessThan(LessThan.class.cast(criteria));
private void processAttributes(Set<Attribute<?>> attributes) { for (Attribute<?> attr : attributes) { attribute(attr.getAttributeName()); } }
private void processOrdering(List<Ordering> orderings) { for (Ordering ordering : orderings) { String attributeName = ordering.getAttribute().getAttributeName(); if (Direction.DESCENDING.equals(ordering.getDirection())) { attributeDescending(attributeName); } else { attributeAscending(attributeName); } } }
private void processAggregators(List<AggregatorInstance<?>> aggregatorInstances) { for (AggregatorInstance aggregatorInstance : aggregatorInstances) { if (aggregatorInstance instanceof Count) { count(); } else if (aggregatorInstance instanceof Average) { average(aggregatorInstance.getAttribute().getAttributeName()); } else if (aggregatorInstance instanceof Sum) { sum(aggregatorInstance.getAttribute().getAttributeName()); } else if (aggregatorInstance instanceof Min) { min(aggregatorInstance.getAttribute().getAttributeName()); } else if (aggregatorInstance instanceof Max) { max(aggregatorInstance.getAttribute().getAttributeName()); } else { throw new SearchException("unknown aggregator type: " + aggregatorInstance.getClass().getName()); } } }
private void processAndCriteria(And criteria) { beginGroup(); and(); for (Criteria element : criteria.getCriterion()) { processCriteria(element); } endGroup(); }
private void processAlwaysCriteria(AlwaysMatch cast) { all(); }
private void processGreaterThanOrEqualCriteria(GreaterThanOrEqual criteria) { greaterThanEqual(criteria.getAttributeName(), criteria.getComparableValue()); }
private void processGreaterThanCriteria(GreaterThan criteria) { greaterThan(criteria.getAttributeName(), criteria.getComparableValue()); }
private void processBetweenCriteria(Between criteria) { between(criteria.getAttributeName(), criteria.getMin(), criteria.getAttributeName(), criteria.getMax(), criteria.isMinInclusive(), criteria.isMaxInclusive()); }
private void processAggregators(List<AggregatorInstance<?>> aggregatorInstances) { for (AggregatorInstance aggregatorInstance : aggregatorInstances) { if (aggregatorInstance instanceof Count) { count(); } else if (aggregatorInstance instanceof Average) { average(aggregatorInstance.getAttribute().getAttributeName()); } else if (aggregatorInstance instanceof Sum) { sum(aggregatorInstance.getAttribute().getAttributeName()); } else if (aggregatorInstance instanceof Min) { min(aggregatorInstance.getAttribute().getAttributeName()); } else if (aggregatorInstance instanceof Max) { max(aggregatorInstance.getAttribute().getAttributeName()); } else { throw new SearchException("unknown aggregator type: " + aggregatorInstance.getClass().getName()); } } }
all(); } else if (criteria instanceof And) { and(And.class.cast(criteria)); } else if (criteria instanceof Or) { or(Or.class.cast(criteria)); } else if (criteria instanceof Not) { processNotCriteria(Not.class.cast(criteria)); } else if (criteria instanceof NotEqualTo) { notEqualTerm(NotEqualTo.class.cast(criteria)); } else if (criteria instanceof NotILike) { notIlike(NotILike.class.cast(criteria)); } else if (criteria instanceof NotNull) { notNull(NotNull.class.cast(criteria)); } else if (criteria instanceof Between) { between(Between.class.cast(criteria)); } else if (criteria instanceof EqualTo) { equalTo(EqualTo.class.cast(criteria)); } else if (criteria instanceof IsNull) { isNull(IsNull.class.cast(criteria)); } else if (criteria instanceof ILike) { ilike(ILike.class.cast(criteria)); } else if (criteria instanceof GreaterThan) { greaterThan(GreaterThan.class.cast(criteria)); } else if (criteria instanceof GreaterThanOrEqual) { greaterThanEqual(GreaterThanOrEqual.class.cast(criteria)); } else if (criteria instanceof InCollection) { in(InCollection.class.cast(criteria)); } else if (criteria instanceof LessThan) { lessThan(LessThan.class.cast(criteria));
private void processAggregators(List<AggregatorInstance<?>> aggregatorInstances) { for (AggregatorInstance aggregatorInstance : aggregatorInstances) { if (aggregatorInstance instanceof Count) { count(); } else if (aggregatorInstance instanceof Average) { average(aggregatorInstance.getAttribute().getAttributeName()); } else if (aggregatorInstance instanceof Sum) { sum(aggregatorInstance.getAttribute().getAttributeName()); } else if (aggregatorInstance instanceof Min) { min(aggregatorInstance.getAttribute().getAttributeName()); } else if (aggregatorInstance instanceof Max) { max(aggregatorInstance.getAttribute().getAttributeName()); } else { throw new SearchException("unknown aggregator type: " + aggregatorInstance.getClass().getName()); } } }
private void processOrdering(List<Ordering> orderings) { for (Ordering ordering : orderings) { String attributeName = ordering.getAttribute().getAttributeName(); if (Direction.DESCENDING.equals(ordering.getDirection())) { attributeDescending(attributeName); } else { attributeAscending(attributeName); } } }
private void processAttributes(Set<Attribute<?>> attributes) { for (Attribute<?> attr : attributes) { attribute(attr.getAttributeName()); } }
all(); } else if (criteria instanceof And) { and(And.class.cast(criteria)); } else if (criteria instanceof Or) { or(Or.class.cast(criteria)); } else if (criteria instanceof Not) { processNotCriteria(Not.class.cast(criteria)); } else if (criteria instanceof NotEqualTo) { notEqualTerm(NotEqualTo.class.cast(criteria)); } else if (criteria instanceof NotILike) { notIlike(NotILike.class.cast(criteria)); } else if (criteria instanceof NotNull) { notNull(NotNull.class.cast(criteria)); } else if (criteria instanceof Between) { between(Between.class.cast(criteria)); } else if (criteria instanceof EqualTo) { equalTo(EqualTo.class.cast(criteria)); } else if (criteria instanceof IsNull) { isNull(IsNull.class.cast(criteria)); } else if (criteria instanceof ILike) { ilike(ILike.class.cast(criteria)); } else if (criteria instanceof GreaterThan) { greaterThan(GreaterThan.class.cast(criteria)); } else if (criteria instanceof GreaterThanOrEqual) { greaterThanEqual(GreaterThanOrEqual.class.cast(criteria)); } else if (criteria instanceof InCollection) { in(InCollection.class.cast(criteria)); } else if (criteria instanceof LessThan) { lessThan(LessThan.class.cast(criteria));
private void processAggregators(List<AggregatorInstance<?>> aggregatorInstances) { for (AggregatorInstance aggregatorInstance : aggregatorInstances) { if (aggregatorInstance instanceof Count) { count(); } else if (aggregatorInstance instanceof Average) { average(aggregatorInstance.getAttribute().getAttributeName()); } else if (aggregatorInstance instanceof Sum) { sum(aggregatorInstance.getAttribute().getAttributeName()); } else if (aggregatorInstance instanceof Min) { min(aggregatorInstance.getAttribute().getAttributeName()); } else if (aggregatorInstance instanceof Max) { max(aggregatorInstance.getAttribute().getAttributeName()); } else { throw new SearchException("unknown aggregator type: " + aggregatorInstance.getClass().getName()); } } }
private void processOrdering(List<Ordering> orderings) { for (Ordering ordering : orderings) { String attributeName = ordering.getAttribute().getAttributeName(); if (Direction.DESCENDING.equals(ordering.getDirection())) { attributeDescending(attributeName); } else { attributeAscending(attributeName); } } }
private void processAttributes(Set<Attribute<?>> attributes) { for (Attribute<?> attr : attributes) { attribute(attr.getAttributeName()); } }
private void processOrdering(List<Ordering> orderings) { for (Ordering ordering : orderings) { String attributeName = ordering.getAttribute().getAttributeName(); if (Direction.DESCENDING.equals(ordering.getDirection())) { attributeDescending(attributeName); } else { attributeAscending(attributeName); } } }
private void processAttributes(Set<Attribute<?>> attributes) { for (Attribute<?> attr : attributes) { attribute(attr.getAttributeName()); } }