Package org.eclipse.persistence.jpa.jpql.parser

Examples of org.eclipse.persistence.jpa.jpql.parser.Expression.accept()


      if (pathExpression != null) {
        boolean valid = validateStateFieldPathExpression(pathExpression, PathType.ASSOCIATION_FIELD_ONLY);
        updateStatus(result, 0, valid);
      }
      else {
        entityExpression.accept(this);
      }
    }

    // Validate the collection-valued path expression
    boolean valid = validateCollectionValuedPathExpression(expression.getCollectionValuedPathExpression(), true);
View Full Code Here


      validator.validatingLeftExpression = true;
      leftExpression.accept(validator);

      // Visit the right expression and gather its information
      validator.validatingLeftExpression = false;
      rightExpression.accept(validator);

      // '<', '<=', '>=', '>'
      if (isOrderComparison(expression)) {

        // The left expression cannot be an identification variable
View Full Code Here

      if (pathExpression != null) {
        validateStateFieldPathExpression(pathExpression, validPathExpressionTypeForCountFunction());
      }
      else {
        leftExpression.accept(this);
      }
    }
  }

  /**
 
View Full Code Here

    Expression declarationExpression = declaration.getDeclarationExpression();
    Expression baseExpression = declaration.getBaseExpression();

    try {
      baseExpression.accept(visitor);

      if (!visitor.valid) {

        int startPosition = position(declarationExpression);
        int endPosition = startPosition + length(declarationExpression);
View Full Code Here

      if (pathExpression != null) {
        valid = validateStateFieldPathExpression(pathExpression, PathType.BASIC_FIELD_ONLY);
      }
      else {
        encapsulatedExpression.accept(this);
      }
    }

    return valid;
  }
View Full Code Here

      if (pathExpression != null) {
        boolean valid = validateStateFieldPathExpression(pathExpression, pathType);
        updateStatus(result, 0, valid);
      }
      else {
        leftExpression.accept(this);
      }
    }

    // Right expression
    if (expression.hasRightExpression()) {
View Full Code Here

      if (pathExpression != null) {
        boolean valid = validateStateFieldPathExpression(pathExpression, pathType);
        updateStatus(result, 1, valid);
      }
      else {
        rightExpression.accept(this);
      }
    }

    return result;
  }
View Full Code Here

      if (pathExpression != null) {
        validateStateFieldPathExpression(pathExpression, validPathExpressionTypeForInExpression());
      }
      else {
        stringExpression.accept(this);
      }
    }

    // Validate the items
    expression.getInItems().accept(getInItemsVisitor());
View Full Code Here

          index--;
        }

        // Now traverse the child
        Expression child = expression.getChild(index);
        child.accept(this);

        // Rather than marking the CollectionExpression as the Expression to visit
        // with the adjusted QueryPosition, the child that to the left of the invalid
        // expression will be used instead.
        // Example: "SELECT e FROM Employee e WHERE CONCAT(e.name, A|S a)" <- | is the cursor
View Full Code Here

     */
    public void visit(JPQLExpression expression) {

      if (expression.hasQueryStatement()) {
        Expression queryStatement = expression.getQueryStatement();
        queryStatement.accept(this);
        queryPosition.addPosition(expression, queryStatement.getLength() - correction);
      }
      else {
        queryPosition.setExpression(expression);
        queryPosition.addPosition(expression, 0);
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.