use of org.drools.core.util.index.IndexUtil.ConstraintType in project drools by kiegroup.
the class CompositeObjectSinkAdapter method isRangeIndexable.
private boolean isRangeIndexable(AlphaNode alphaNode) {
AlphaNodeFieldConstraint fieldConstraint = alphaNode.getConstraint();
if (fieldConstraint instanceof IndexableConstraint) {
IndexableConstraint indexableConstraint = (IndexableConstraint) fieldConstraint;
ConstraintType constraintType = indexableConstraint.getConstraintType();
return (constraintType.isAscending() || constraintType.isDescending()) && indexableConstraint.getField() != null && !indexableConstraint.getField().isNull() && indexableConstraint.getFieldExtractor().getValueType() != ValueType.OBJECT_TYPE && // our current implementation does not support range indexing of deeply nested properties
indexableConstraint.getFieldExtractor().getIndex() >= 0;
}
return false;
}
Aggregations