Examples of AndExpr


Examples of com.caucho.amber.expr.AndExpr

   */
  void init()
    throws QueryParseException
  {
    if (_where instanceof AndExpr) {
      AndExpr and = (AndExpr) _where;

      ArrayList<AmberExpr> components = and.getComponents();

      for (int i = components.size() - 1; i >= 0; i--) {
        AmberExpr component = components.get(i);

        if (component instanceof JoinExpr) {
          JoinExpr link = (JoinExpr) component;

          if (link.bindToFromItem()) {
            components.remove(i);
          }
        }
      }

      _where = and.getSingle();
    }

    if (_having instanceof AndExpr) {
      AndExpr and = (AndExpr) _having;

      ArrayList<AmberExpr> components = and.getComponents();

      for (int i = components.size() - 1; i >= 0; i--) {
        AmberExpr component = components.get(i);

        if (component instanceof JoinExpr) {
          JoinExpr link = (JoinExpr) component;

          if (link.bindToFromItem()) {
            components.remove(i);
          }
        }
      }

      _having = and.getSingle();
    }

    // Rolls up unused from items from the left to the right.
    // It's not necessary to roll up the rightmost items because
    // they're only created if they're actually needed
View Full Code Here

Examples of com.caucho.amber.expr.AndExpr

   */
  void init()
    throws QueryParseException
  {
    if (_where instanceof AndExpr) {
      AndExpr and = (AndExpr) _where;

      ArrayList<AmberExpr> components = and.getComponents();

      for (int i = components.size() - 1; i >= 0; i--) {
        AmberExpr component = components.get(i);

        if (component instanceof JoinExpr) {
          JoinExpr link = (JoinExpr) component;

          if (link.bindToFromItem()) {
            components.remove(i);
          }
        }
      }

      _where = and.getSingle();
    }

    if (_having instanceof AndExpr) {
      AndExpr and = (AndExpr) _having;

      ArrayList<AmberExpr> components = and.getComponents();

      for (int i = components.size() - 1; i >= 0; i--) {
        AmberExpr component = components.get(i);

        if (component instanceof JoinExpr) {
          JoinExpr link = (JoinExpr) component;

          if (link.bindToFromItem()) {
            components.remove(i);
          }
        }
      }

      _having = and.getSingle();
    }

    // Rolls up unused from items from the left to the right.
    // It's not necessary to roll up the rightmost items because
    // they're only created if they're actually needed
View Full Code Here

Examples of org.infinispan.objectfilter.impl.syntax.AndExpr

      BooleanExpr firstChild = children.get(0).getQuery();
      if (children.size() == 1) {
         return firstChild;
      }

      AndExpr andExpr = new AndExpr(firstChild);

      for (int i = 1; i < children.size(); i++) {
         BooleanExpr child = children.get(i).getQuery();
         andExpr.getChildren().add(child);
      }

      return andExpr;
   }
View Full Code Here

Examples of org.infinispan.objectfilter.impl.syntax.AndExpr

      super(propertyName, lower, upper);
   }

   @Override
   public BooleanExpr getQuery() {
      return new AndExpr(
            new ComparisonExpr(new PropertyValueExpr(propertyName), new ConstantValueExpr((Comparable) lower), ComparisonExpr.Type.GREATER_OR_EQUAL),
            new ComparisonExpr(new PropertyValueExpr(propertyName), new ConstantValueExpr((Comparable) upper), ComparisonExpr.Type.LESS_OR_EQUAL)
      );
   }
View Full Code Here

Examples of org.infinispan.objectfilter.impl.syntax.AndExpr

      super(propertyName, lower, upper);
   }

   @Override
   public BooleanExpr getQuery() {
      return new AndExpr(
            new ComparisonExpr(new PropertyValueExpr(propertyName), new ConstantValueExpr(lower), ComparisonPredicate.Type.GREATER_OR_EQUAL),
            new ComparisonExpr(new PropertyValueExpr(propertyName), new ConstantValueExpr(upper), ComparisonPredicate.Type.LESS_OR_EQUAL)
      );
   }
View Full Code Here

Examples of xbird.xquery.expr.logical.AndExpr

            for(final XQExpression andExpr : andExprs) {
                andExpr.visit(dependancyChecker, null);
                if(dependancyChecker.hasDependancy()) {
                    final Binding dep = dependancyChecker.getDependent();
                    if(dependancies.containsKey(dep)) {
                        final AndExpr e = new AndExpr(dependancies.get(dep), andExpr);
                        e.copyLocations(andExpr);
                        dependancies.put(dep, e);
                    } else {
                        dependancies.put(dep, andExpr);
                    }
                } else {
View Full Code Here

Examples of xbird.xquery.expr.logical.AndExpr

        if(nWhereSize == 0) {
            flwr.setWhereExpr(null);
        } else if(nWhereSize == 1) {
            flwr.setWhereExpr(whereExprs.get(0));
        } else {
            flwr.setWhereExpr(new AndExpr(whereExprs));
        }
    }
View Full Code Here

Examples of xbird.xquery.expr.logical.AndExpr

    public void addWhereExpr(XQExpression expr) {
        assert (expr != null);
        if(_whereExpr == null) {
            this._whereExpr = expr;
        } else {
            this._whereExpr = new AndExpr(_whereExpr, expr);
        }
    }
View Full Code Here

Examples of xbird.xquery.expr.logical.AndExpr

            int nodepLen = nodeps.size();
            final XQExpression cond;
            if(nodepLen == 1) {
                cond = nodeps.get(0);
            } else {
                cond = new AndExpr(nodeps);
            }
            ret = new IfExpr(cond, ret);
            this._whereExpr = null;
        }
        assert (this._filteredReturnExpr != null);
View Full Code Here

Examples of xbird.xquery.expr.logical.AndExpr

                    return exprs.get(0);
            }
        } else {
            {
                if(true)
                    return locate(new AndExpr(exprs));
            }
        }
        throw new Error("Missing return statement in function");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.