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

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


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

      // Identifier
      appendIdentifier((expression != null) ? expression.getActualIdentifier() : stateObject.getIdentifier(), stateObject.getIdentifier());

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

      // 'DISTINCT'
      if (stateObject.hasDistinct()) {
        appendIdentifier((expression != null) ? expression.getActualDistinctIdentifier() : DISTINCT, DISTINCT);

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

      // Encapsulated expression
      if (stateObject.hasStateObject()) {
        stateObject.getStateObject().accept(this);
      }

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


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

      // Identifier
      appendIdentifier((expression != null) ? expression.getActualIdentifier() : stateObject.getIdentifier(), stateObject.getIdentifier());

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

      // 'DISTINCT'
      if (stateObject.hasDistinct()) {
        appendIdentifier((expression != null) ? expression.getActualDistinctIdentifier() : DISTINCT, DISTINCT);

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

      // Encapsulated expression
      if (stateObject.hasStateObject()) {
        stateObject.getStateObject().accept(this);
      }

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

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

      // Identifier
      appendIdentifier((expression != null) ? expression.getActualIdentifier() : stateObject.getIdentifier(), stateObject.getIdentifier());

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

      // 'DISTINCT'
      if (stateObject.hasDistinct()) {
        appendIdentifier((expression != null) ? expression.getActualDistinctIdentifier() : DISTINCT, DISTINCT);

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

      // Encapsulated expression
      if (stateObject.hasStateObject()) {
        stateObject.getStateObject().accept(this);
      }

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

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

      // Identifier
      appendIdentifier((expression != null) ? expression.getActualIdentifier() : stateObject.getIdentifier(), stateObject.getIdentifier());

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

      // 'DISTINCT'
      if (stateObject.hasDistinct()) {
        appendIdentifier((expression != null) ? expression.getActualDistinctIdentifier() : DISTINCT, DISTINCT);

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

      // Encapsulated expression
      if (stateObject.hasStateObject()) {
        stateObject.getStateObject().accept(this);
      }

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

TOP

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

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.