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

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


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

      // String expression
      if (stateObject.hasStringStateObject()) {
        stateObject.getStringStateObject().accept(this);
      }

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

      // 'NOT'
      if (stateObject.hasNot()) {
        appendIdentifier((expression != null) ? expression.getActualNotIdentifier() : NOT, NOT);
        writer.append(SPACE);
      }

      // 'LIKE'
      appendIdentifier((expression != null) ? expression.getActualLikeIdentifier() : LIKE, LIKE);

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

      // Pattern value
      if (stateObject.hasPatternValue()) {
        stateObject.getPatternValue().accept(this);
      }

      if (exactMatch && (expression != null) && expression.hasSpaceAfterPatternValue()) {
        writer.append(SPACE);
      }

      // Escape character
      if (stateObject.hasEscapeCharacter()) {

        if (!exactMatch) {
          writer.append(SPACE);
        }

        appendIdentifier((expression != null) ? expression.getActualEscapeIdentifier() : ESCAPE, ESCAPE);

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

        writer.append(stateObject.getEscapeCharacter());
      }
View Full Code Here


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

      // String expression
      if (stateObject.hasStringStateObject()) {
        stateObject.getStringStateObject().accept(this);
      }

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

      // 'NOT'
      if (stateObject.hasNot()) {
        appendIdentifier((expression != null) ? expression.getActualNotIdentifier() : NOT, NOT);
        writer.append(SPACE);
      }

      // 'LIKE'
      appendIdentifier((expression != null) ? expression.getActualLikeIdentifier() : LIKE, LIKE);

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

      // Pattern value
      if (stateObject.hasPatternValue()) {
        stateObject.getPatternValue().accept(this);
      }

      if (exactMatch && (expression != null) && expression.hasSpaceAfterPatternValue()) {
        writer.append(SPACE);
      }

      // Escape character
      if (stateObject.hasEscapeCharacter()) {

        if (!exactMatch) {
          writer.append(SPACE);
        }

        appendIdentifier((expression != null) ? expression.getActualEscapeIdentifier() : ESCAPE, ESCAPE);

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

        writer.append(stateObject.getEscapeCharacter());
      }
View Full Code Here

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

      // String expression
      if (stateObject.hasStringStateObject()) {
        stateObject.getStringStateObject().accept(this);
      }

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

      // 'NOT'
      if (stateObject.hasNot()) {
        appendIdentifier((expression != null) ? expression.getActualNotIdentifier() : NOT, NOT);
        writer.append(SPACE);
      }

      // 'LIKE'
      appendIdentifier((expression != null) ? expression.getActualLikeIdentifier() : LIKE, LIKE);

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

      // Pattern value
      if (stateObject.hasPatternValue()) {
        stateObject.getPatternValue().accept(this);
      }

      if (exactMatch && (expression != null) && expression.hasSpaceAfterPatternValue()) {
        writer.append(SPACE);
      }

      // Escape character
      if (stateObject.hasEscapeCharacter()) {

        if (!exactMatch) {
          writer.append(SPACE);
        }

        appendIdentifier((expression != null) ? expression.getActualEscapeIdentifier() : ESCAPE, ESCAPE);

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

        writer.append(stateObject.getEscapeCharacter());
      }
View Full Code Here

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

      // String expression
      if (stateObject.hasStringStateObject()) {
        stateObject.getStringStateObject().accept(this);
      }

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

      // 'NOT'
      if (stateObject.hasNot()) {
        appendIdentifier((expression != null) ? expression.getActualNotIdentifier() : NOT, NOT);
        writer.append(SPACE);
      }

      // 'LIKE'
      appendIdentifier((expression != null) ? expression.getActualLikeIdentifier() : LIKE, LIKE);

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

      // Pattern value
      if (stateObject.hasPatternValue()) {
        stateObject.getPatternValue().accept(this);
      }

      if (exactMatch && (expression != null) && expression.hasSpaceAfterPatternValue()) {
        writer.append(SPACE);
      }

      // Escape character
      if (stateObject.hasEscapeCharacter()) {

        if (!exactMatch) {
          writer.append(SPACE);
        }

        appendIdentifier((expression != null) ? expression.getActualEscapeIdentifier() : ESCAPE, ESCAPE);

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

        writer.append(stateObject.getEscapeCharacter());
      }
View Full Code Here

TOP

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

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.