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

Examples of org.eclipse.persistence.jpa.jpql.parser.StateFieldPathExpression


  protected void validateSelectClause(SelectClause expression) {

    Expression selectExpression = expression.getSelectExpression();

    // Special case for state field path expression, all types are allowed
    StateFieldPathExpression pathExpression = getStateFieldPathExpression(selectExpression);

    if (pathExpression != null) {
      validateStateFieldPathExpression(pathExpression, selectClausePathExpressionPathType());
    }
    else {
View Full Code Here


  public void visit(IdentificationVariable expression) {

    // The identification variable is virtual, only do something if it falsely represents a state
    // field path expression
    if (expression.isVirtual()) {
      StateFieldPathExpression stateFieldPathExpression = expression.getStateFieldPathExpression();

      if (stateFieldPathExpression != null) {
        stateFieldPathExpression.accept(this);
        return;
      }
    }

    // Entity type name
View Full Code Here

  protected void validateNullComparisonExpression(NullComparisonExpression expression) {

    super.validateNullComparisonExpression(expression);

    // Null comparisons over instances of embeddable class types are not supported
    StateFieldPathExpression pathExpression = getStateFieldPathExpression(expression.getExpression());

    if (pathExpression != null) {
      Object type = helper.getType(pathExpression);

      if (helper.getEmbeddable(type) != null) {
        addProblem(pathExpression, NullComparisonExpression_InvalidType, pathExpression.toParsedText());
      }
    }
  }
View Full Code Here

       if (ExpressionTools.stringIsNotEmpty(entityName)) {
         Object entity = helper.getEntityNamed(entityName);

        // Check the existence of the state field on the entity
        if ((entity != null) && expression.hasSpaceAfterStateFieldPathExpression()) {
          StateFieldPathExpression pathExpression = getStateFieldPathExpression(expression.getStateFieldPathExpression());
          String stateFieldValue = (pathExpression != null) ? pathExpression.toParsedText() : null;

          if (ExpressionTools.stringIsNotEmpty(stateFieldValue)) {

            // State field without a dot
            if (stateFieldValue.indexOf(".") == -1) {
View Full Code Here

    public void visit(IdentificationVariable expression) {

      // Check to see if the identification variable is "virtual" and internally
      // changed to a state field path expression. If so, it means it's an unqualified
      // path found in an UPDATE or DELETE query
      StateFieldPathExpression pathExpression = expression.isVirtual() ? expression.getStateFieldPathExpression() : null;

      if (pathExpression != null) {
        pathExpression.accept(this);
      }
      else {
        Declaration declaration = queryContext.findDeclaration(expression.getVariableName());

        // A null declaration Expression would mean it's the first package of an enum type
View Full Code Here

  public void visit(IdentificationVariable expression) {

    // The identification variable is virtual, only do something if it falsely represents a state
    // field path expression
    if (expression.isVirtual()) {
      StateFieldPathExpression stateFieldPathExpression = expression.getStateFieldPathExpression();

      if (stateFieldPathExpression != null) {
        stateFieldPathExpression.accept(this);
        return;
      }
    }

    // Entity type name
View Full Code Here

    public void visit(IdentificationVariable expression) {

      // Check to see if the identification variable is "virtual" and internally
      // changed to a state field path expression. If so, it means it's an unqualified
      // path found in an UPDATE or DELETE query
      StateFieldPathExpression pathExpression = expression.isVirtual() ? expression.getStateFieldPathExpression() : null;

      if (pathExpression != null) {
        pathExpression.accept(this);
      }
      else {
        Declaration declaration = queryContext.findDeclaration(expression.getVariableName());

        // A null declaration Expression would mean it's the first package of an enum type
View Full Code Here

  public void visit(IdentificationVariable expression) {

    // The identification variable is virtual, only do something
    // if it falsely represents a state field path expression
    if (expression.isVirtual()) {
      StateFieldPathExpression stateFieldPathExpression = expression.getStateFieldPathExpression();

      if (stateFieldPathExpression != null) {
        stateFieldPathExpression.accept(this);
        return;
      }
    }

    String variableName = expression.getVariableName();
View Full Code Here

    if (expression.hasExpression()) {
      Expression factor = expression.getExpression();

      // Special case for state field path expression, association field is not allowed
      StateFieldPathExpression pathExpression = getStateFieldPathExpression(factor);

      if (pathExpression != null) {
        valid = validateStateFieldPathExpression(pathExpression, PathType.BASIC_FIELD_ONLY);
      }
      else {
View Full Code Here

    // Validate the "first" expression
    if (expression.hasExpression()) {
      Expression firstExpression = expression.getExpression();

      // Special case for state field path expression, association field is not allowed
      StateFieldPathExpression pathExpression = getStateFieldPathExpression(firstExpression);

      if (pathExpression != null) {
        boolean valid = validateStateFieldPathExpression(pathExpression, PathType.BASIC_FIELD_ONLY);
        updateStatus(result, 0, valid);
      }
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.jpa.jpql.parser.StateFieldPathExpression

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.