Examples of TrimExpression


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

      getGrammar(),
      FunctionsReturningStringsBNF.ID,
      true
    );

    TrimExpression trimExpression = (TrimExpression) jpqlExpression.getQueryStatement();
    setSpecification(trimExpression.getSpecification());
    parseTrimCharacter(trimExpression.getTrimCharacter().toParsedText());
    super.parse(trimExpression.getExpression().toParsedText());

    // The trim character is actually the string primary
    if (!hasStateObject() && hasTrimCharacter()) {
      setStateObject(new StringLiteralStateObject(this, trimCharacter.toString()));
      trimCharacter = null;
View Full Code Here

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

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

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

      // '('
      if (shouldOutput(expression) || expression.hasLeftParenthesis()) {
        writer.append(LEFT_PARENTHESIS);
      }
      else if ((expression != null) && expression.hasSpaceAfterIdentifier()) {
        writer.append(SPACE);
      }

      // Trim specification
      if (stateObject.hasSpecification()) {
        String specification = stateObject.getSpecification().name();
        String actualSpecification = (expression != null) ? expression.getActualSpecificationIdentifier() : null;

        if (!specification.equalsIgnoreCase(actualSpecification)) {
          actualSpecification = specification;
        }

        appendIdentifier(actualSpecification, specification);
      }

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

      // Trim character
      if (stateObject.hasTrimCharacter()) {
        stateObject.getTrimCharacter().accept(this);

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

      // 'FROM'
      if (stateObject.hasSpecification() ||
          stateObject.hasTrimCharacter()) {

        appendIdentifier((expression != null) ? expression.getActualFromIdentifier() : FROM, FROM);

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

      // String primary
      if (stateObject.hasStateObject()) {
        stateObject.getStateObject().accept(this);
      }

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

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

      getGrammar(),
      FunctionsReturningStringsBNF.ID,
      true
    );

    TrimExpression trimExpression = (TrimExpression) jpqlExpression.getQueryStatement();
    setSpecification(trimExpression.getSpecification());
    parseTrimCharacter(trimExpression.getTrimCharacter().toParsedText());
    super.parse(trimExpression.getExpression().toParsedText());

    // The trim character is actually the string primary
    if (!hasStateObject() && hasTrimCharacter()) {
      setStateObject(new StringLiteralStateObject(this, trimCharacter.toString()));
      trimCharacter = null;
View Full Code Here

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

      getGrammar(),
      FunctionsReturningStringsBNF.ID,
      true
    );

    TrimExpression trimExpression = (TrimExpression) jpqlExpression.getQueryStatement();
    setSpecification(trimExpression.getSpecification());
    parseTrimCharacter(trimExpression.getTrimCharacter().toParsedText());
    super.parse(trimExpression.getExpression().toParsedText());

    // The trim character is actually the string primary
    if (!hasStateObject() && hasTrimCharacter()) {
      setStateObject(new StringLiteralStateObject(this, trimCharacter.toString()));
      trimCharacter = null;
View Full Code Here

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

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

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

      // '('
      if (shouldOutput(expression) || expression.hasLeftParenthesis()) {
        writer.append(LEFT_PARENTHESIS);
      }
      else if ((expression != null) && expression.hasSpaceAfterIdentifier()) {
        writer.append(SPACE);
      }

      // Trim specification
      if (stateObject.hasSpecification()) {
        String specification = stateObject.getSpecification().name();
        String actualSpecification = (expression != null) ? expression.getActualSpecificationIdentifier() : null;

        if (!specification.equalsIgnoreCase(actualSpecification)) {
          actualSpecification = specification;
        }

        appendIdentifier(actualSpecification, specification);
      }

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

      // Trim character
      if (stateObject.hasTrimCharacter()) {
        stateObject.getTrimCharacter().accept(this);

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

      // 'FROM'
      if (stateObject.hasSpecification() ||
          stateObject.hasTrimCharacter()) {

        appendIdentifier((expression != null) ? expression.getActualFromIdentifier() : FROM, FROM);

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

      // String primary
      if (stateObject.hasStateObject()) {
        stateObject.getStateObject().accept(this);
      }

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

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

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

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

      // '('
      if (shouldOutput(expression) || expression.hasLeftParenthesis()) {
        writer.append(LEFT_PARENTHESIS);
      }
      else if ((expression != null) && expression.hasSpaceAfterIdentifier()) {
        writer.append(SPACE);
      }

      // Trim specification
      if (stateObject.hasSpecification()) {
        String specification = stateObject.getSpecification().name();
        String actualSpecification = (expression != null) ? expression.getActualSpecificationIdentifier() : null;

        if (!specification.equalsIgnoreCase(actualSpecification)) {
          actualSpecification = specification;
        }

        appendIdentifier(actualSpecification, specification);
      }

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

      // Trim character
      if (stateObject.hasTrimCharacter()) {
        stateObject.getTrimCharacter().accept(this);

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

      // 'FROM'
      if (stateObject.hasSpecification() ||
          stateObject.hasTrimCharacter()) {

        appendIdentifier((expression != null) ? expression.getActualFromIdentifier() : FROM, FROM);

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

      // String primary
      if (stateObject.hasStateObject()) {
        stateObject.getStateObject().accept(this);
      }

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

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

      getGrammar(),
      FunctionsReturningStringsBNF.ID,
      true
    );

    TrimExpression trimExpression = (TrimExpression) jpqlExpression.getQueryStatement();
    setSpecification(trimExpression.getSpecification());
    parseTrimCharacter(trimExpression.getTrimCharacter().toParsedText());
    super.parse(trimExpression.getExpression().toParsedText());

    // The trim character is actually the string primary
    if (!hasStateObject() && hasTrimCharacter()) {
      setStateObject(new StringLiteralStateObject(this, trimCharacter.toString()));
      trimCharacter = null;
View Full Code Here

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

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

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

      // '('
      if (shouldOutput(expression) || expression.hasLeftParenthesis()) {
        writer.append(LEFT_PARENTHESIS);
      }
      else if ((expression != null) && expression.hasSpaceAfterIdentifier()) {
        writer.append(SPACE);
      }

      // Trim specification
      if (stateObject.hasSpecification()) {
        String specification = stateObject.getSpecification().name();
        String actualSpecification = (expression != null) ? expression.getActualSpecificationIdentifier() : null;

        if (!specification.equalsIgnoreCase(actualSpecification)) {
          actualSpecification = specification;
        }

        appendIdentifier(actualSpecification, specification);
      }

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

      // Trim character
      if (stateObject.hasTrimCharacter()) {
        stateObject.getTrimCharacter().accept(this);

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

      // 'FROM'
      if (stateObject.hasSpecification() ||
          stateObject.hasTrimCharacter()) {

        appendIdentifier((expression != null) ? expression.getActualFromIdentifier() : FROM, FROM);

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

      // String primary
      if (stateObject.hasStateObject()) {
        stateObject.getStateObject().accept(this);
      }

      // ')'
      if (shouldOutput(expression) || expression.hasRightParenthesis()) {
        writer.append(RIGHT_PARENTHESIS);
      }
    }
  }
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.