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

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


    if (stateObject.isDecorated()) {
      toText(stateObject);
    }
    else {
      TreatExpression expression = stateObject.getExpression();

      // TREAT
      appendIdentifier((expression != null) ? expression.getActualIdentifier() : TREAT, TREAT);

      // (
      if (shouldOutput(expression) || expression.hasLeftParenthesis()) {
        writer.append(LEFT_PARENTHESIS);
      }

      // Join association path expression
      stateObject.getJoinAssociationPathStateObject().accept(this);

      if (shouldOutput(expression) || expression.hasSpaceAfterCollectionValuedPathExpression()) {
        writer.append(SPACE);
      }

      // AS
      if (stateObject.hasAs()) {

        appendIdentifier((expression != null) ? expression.getActualAsIdentifier() : AS, AS);

        if (shouldOutput(expression) || expression.hasSpaceAfterAs()) {
          writer.append(SPACE);
        }
      }

      // Entity type name
      writer.append(stateObject.getEntityTypeName());

      // )
      if (shouldOutput(expression) || expression.hasRightParenthesis()) {
        writer.append(RIGHT_PARENTHESIS);
      }
    }
  }
View Full Code Here


    if (stateObject.isDecorated()) {
      toText(stateObject);
    }
    else {
      TreatExpression expression = stateObject.getExpression();

      // TREAT
      appendIdentifier((expression != null) ? expression.getActualIdentifier() : TREAT, TREAT);

      // (
      if (shouldOutput(expression) || expression.hasLeftParenthesis()) {
        writer.append(LEFT_PARENTHESIS);
      }

      // Join association path expression
      stateObject.getJoinAssociationPathStateObject().accept(this);

      if (shouldOutput(expression) || expression.hasSpaceAfterCollectionValuedPathExpression()) {
        writer.append(SPACE);
      }

      // AS
      if (stateObject.hasAs()) {

        appendIdentifier((expression != null) ? expression.getActualAsIdentifier() : AS, AS);

        if (shouldOutput(expression) || expression.hasSpaceAfterAs()) {
          writer.append(SPACE);
        }
      }

      // Entity type name
      writer.append(stateObject.getEntityTypeName());

      // )
      if (shouldOutput(expression) || expression.hasRightParenthesis()) {
        writer.append(RIGHT_PARENTHESIS);
      }
    }
  }
View Full Code Here

    if (stateObject.isDecorated()) {
      toText(stateObject);
    }
    else {
      TreatExpression expression = stateObject.getExpression();

      // TREAT
      appendIdentifier((expression != null) ? expression.getActualIdentifier() : TREAT, TREAT);

      // (
      if (shouldOutput(expression) || expression.hasLeftParenthesis()) {
        writer.append(LEFT_PARENTHESIS);
      }

      // Join association path expression
      stateObject.getJoinAssociationPathStateObject().accept(this);

      if (shouldOutput(expression) || expression.hasSpaceAfterCollectionValuedPathExpression()) {
        writer.append(SPACE);
      }

      // AS
      if (stateObject.hasAs()) {

        appendIdentifier((expression != null) ? expression.getActualAsIdentifier() : AS, AS);

        if (shouldOutput(expression) || expression.hasSpaceAfterAs()) {
          writer.append(SPACE);
        }
      }

      // Entity type name
      writer.append(stateObject.getEntityTypeName());

      // )
      if (shouldOutput(expression) || expression.hasRightParenthesis()) {
        writer.append(RIGHT_PARENTHESIS);
      }
    }
  }
View Full Code Here

    if (stateObject.isDecorated()) {
      toText(stateObject);
    }
    else {
      TreatExpression expression = stateObject.getExpression();

      // TREAT
      appendIdentifier((expression != null) ? expression.getActualIdentifier() : TREAT, TREAT);

      // (
      if (shouldOutput(expression) || expression.hasLeftParenthesis()) {
        writer.append(LEFT_PARENTHESIS);
      }

      // Join association path expression
      stateObject.getJoinAssociationPathStateObject().accept(this);

      if (shouldOutput(expression) || expression.hasSpaceAfterCollectionValuedPathExpression()) {
        writer.append(SPACE);
      }

      // AS
      if (stateObject.hasAs()) {

        appendIdentifier((expression != null) ? expression.getActualAsIdentifier() : AS, AS);

        if (shouldOutput(expression) || expression.hasSpaceAfterAs()) {
          writer.append(SPACE);
        }
      }

      // Entity type name
      writer.append(stateObject.getEntityTypeName());

      // )
      if (shouldOutput(expression) || expression.hasRightParenthesis()) {
        writer.append(RIGHT_PARENTHESIS);
      }
    }
  }
View Full Code Here

TOP

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

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.