Package org.infinispan.objectfilter.impl.predicateindex

Examples of org.infinispan.objectfilter.impl.predicateindex.IntervalPredicate


                     parent.setLocation(size, size + 4);
                     nodes.add(parent);
                     treeCounters.add(3);
                  }
                  // the special case of non-equality is transformed into two intervals, excluding the compared value, + an IS NULL predicate
                  addPredicateNode(parent, nodes, treeCounters, isNegated, path, new IntervalPredicate(isRepeated, new Interval(Interval.getMinusInf(), false, right.getConstantValue(), false)));
                  addPredicateNode(parent, nodes, treeCounters, isNegated, path, new IntervalPredicate(isRepeated, new Interval(right.getConstantValue(), false, Interval.getPlusInf(), false)));
                  addPredicateNode(parent, nodes, treeCounters, isNegated, path, new Predicate<Object>(isRepeated, IsNullCondition.INSTANCE));
               } else {
                  addPredicateNode(parent, nodes, treeCounters, !isNegated, path, new Predicate<Object>(isRepeated, new EqualsCondition(right.getConstantValue())));
               }
               break;
            case EQUAL:
               if (useIntervals) {
                  addPredicateNode(parent, nodes, treeCounters, isNegated, path, new IntervalPredicate(isRepeated, new Interval(right.getConstantValue(), true, right.getConstantValue(), true)));
               } else {
                  addPredicateNode(parent, nodes, treeCounters, isNegated, path, new Predicate<Object>(isRepeated, new EqualsCondition(right.getConstantValue())));
               }
               break;
            case LESS:
               addPredicateNode(parent, nodes, treeCounters, isNegated, path, new IntervalPredicate(isRepeated, new Interval(Interval.getMinusInf(), false, right.getConstantValue(), false)));
               break;
            case LESS_OR_EQUAL:
               addPredicateNode(parent, nodes, treeCounters, isNegated, path, new IntervalPredicate(isRepeated, new Interval(Interval.getMinusInf(), false, right.getConstantValue(), true)));
               break;
            case GREATER:
               addPredicateNode(parent, nodes, treeCounters, isNegated, path, new IntervalPredicate(isRepeated, new Interval(right.getConstantValue(), false, Interval.getPlusInf(), false)));
               break;
            case GREATER_OR_EQUAL:
               addPredicateNode(parent, nodes, treeCounters, isNegated, path, new IntervalPredicate(isRepeated, new Interval(right.getConstantValue(), true, Interval.getPlusInf(), false)));
               break;
            default:
               throw new IllegalStateException("Unexpected comparison type: " + expr.getComparisonType());
         }
      } else if (condition instanceof IsNullExpr) {
View Full Code Here

TOP

Related Classes of org.infinispan.objectfilter.impl.predicateindex.IntervalPredicate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.