if (lookupValueBase instanceof RangeIndexLookupValueEquals) {
RangeIndexLookupValueEquals equals = (RangeIndexLookupValueEquals) lookupValueBase;
return propertyIndex.get(equals.getValue());
}
RangeIndexLookupValueRange lookupValue = (RangeIndexLookupValueRange) lookupValueBase;
if (lookupValue.getOperator() == QueryGraphRangeEnum.RANGE_CLOSED) {
Range range = (Range) lookupValue.getValue();
return lookupRange(range.getLowEndpoint(), true, range.getHighEndpoint(), true, lookupValue.isAllowRangeReverse());
}
else if (lookupValue.getOperator() == QueryGraphRangeEnum.RANGE_HALF_OPEN) {
Range range = (Range) lookupValue.getValue();
return lookupRange(range.getLowEndpoint(), true, range.getHighEndpoint(), false, lookupValue.isAllowRangeReverse());
}
else if (lookupValue.getOperator() == QueryGraphRangeEnum.RANGE_HALF_CLOSED) {
Range range = (Range) lookupValue.getValue();
return lookupRange(range.getLowEndpoint(), false, range.getHighEndpoint(), true, lookupValue.isAllowRangeReverse());
}
else if (lookupValue.getOperator() == QueryGraphRangeEnum.RANGE_OPEN) {
Range range = (Range) lookupValue.getValue();
return lookupRange(range.getLowEndpoint(), false, range.getHighEndpoint(), false, lookupValue.isAllowRangeReverse());
}
else if (lookupValue.getOperator() == QueryGraphRangeEnum.NOT_RANGE_CLOSED) {
Range range = (Range) lookupValue.getValue();
return lookupRangeInverted(range.getLowEndpoint(), true, range.getHighEndpoint(), true);
}
else if (lookupValue.getOperator() == QueryGraphRangeEnum.NOT_RANGE_HALF_OPEN) {
Range range = (Range) lookupValue.getValue();
return lookupRangeInverted(range.getLowEndpoint(), true, range.getHighEndpoint(), false);
}
else if (lookupValue.getOperator() == QueryGraphRangeEnum.NOT_RANGE_HALF_CLOSED) {
Range range = (Range) lookupValue.getValue();
return lookupRangeInverted(range.getLowEndpoint(), false, range.getHighEndpoint(), true);
}
else if (lookupValue.getOperator() == QueryGraphRangeEnum.NOT_RANGE_OPEN) {
Range range = (Range) lookupValue.getValue();
return lookupRangeInverted(range.getLowEndpoint(), false, range.getHighEndpoint(), false);
}
else if (lookupValue.getOperator() == QueryGraphRangeEnum.GREATER) {
return lookupGreater(lookupValue.getValue());
}
else if (lookupValue.getOperator() == QueryGraphRangeEnum.GREATER_OR_EQUAL) {
return lookupGreaterEqual(lookupValue.getValue());
}
else if (lookupValue.getOperator() == QueryGraphRangeEnum.LESS) {
return lookupLess(lookupValue.getValue());
}
else if (lookupValue.getOperator() == QueryGraphRangeEnum.LESS_OR_EQUAL) {
return lookupLessEqual(lookupValue.getValue());
}
else {
throw new IllegalArgumentException("Unrecognized operator '" + lookupValue.getOperator() + "'");
}
}