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

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


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

      // 'CASE'
      appendIdentifier((expression != null) ? expression.getActualCaseIdentifier() : CASE, CASE);

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

      // Case operand
      if (stateObject.hasCaseOperand()) {
        stateObject.getCaseOperand().accept(this);

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

      // WHEN clauses
      if (stateObject.hasItems()) {
        toStringChildren(stateObject, false);
      }

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

      // 'ELSE'
      if (shouldOutput(expression) || expression.hasElse()) {
        appendIdentifier((expression != null) ? expression.getActualElseIdentifier() : ELSE, ELSE);
      }

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

      // Else expression
      if (stateObject.hasElse()) {
        stateObject.getElse().accept(this);
      }

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

      // END
      if (shouldOutput(expression) || expression.hasEnd()) {
        appendIdentifier((expression != null) ? expression.getActualEndIdentifier() : END, END);
      }
    }
  }
View Full Code Here


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

      // 'CASE'
      appendIdentifier((expression != null) ? expression.getActualCaseIdentifier() : CASE, CASE);

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

      // Case operand
      if (stateObject.hasCaseOperand()) {
        stateObject.getCaseOperand().accept(this);

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

      // WHEN clauses
      if (stateObject.hasItems()) {
        toStringChildren(stateObject, false);
      }

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

      // 'ELSE'
      if (shouldOutput(expression) || expression.hasElse()) {
        appendIdentifier((expression != null) ? expression.getActualElseIdentifier() : ELSE, ELSE);
      }

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

      // Else expression
      if (stateObject.hasElse()) {
        stateObject.getElse().accept(this);
      }

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

      // END
      if (shouldOutput(expression) || expression.hasEnd()) {
        appendIdentifier((expression != null) ? expression.getActualEndIdentifier() : END, END);
      }
    }
  }
View Full Code Here

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

      // 'CASE'
      appendIdentifier((expression != null) ? expression.getActualCaseIdentifier() : CASE, CASE);

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

      // Case operand
      if (stateObject.hasCaseOperand()) {
        stateObject.getCaseOperand().accept(this);

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

      // WHEN clauses
      if (stateObject.hasItems()) {
        toStringChildren(stateObject, false);
      }

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

      // 'ELSE'
      if (shouldOutput(expression) || expression.hasElse()) {
        appendIdentifier((expression != null) ? expression.getActualElseIdentifier() : ELSE, ELSE);
      }

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

      // Else expression
      if (stateObject.hasElse()) {
        stateObject.getElse().accept(this);
      }

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

      // END
      if (shouldOutput(expression) || expression.hasEnd()) {
        appendIdentifier((expression != null) ? expression.getActualEndIdentifier() : END, END);
      }
    }
  }
View Full Code Here

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

      // 'CASE'
      appendIdentifier((expression != null) ? expression.getActualCaseIdentifier() : CASE, CASE);

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

      // Case operand
      if (stateObject.hasCaseOperand()) {
        stateObject.getCaseOperand().accept(this);

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

      // WHEN clauses
      if (stateObject.hasItems()) {
        toStringChildren(stateObject, false);
      }

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

      // 'ELSE'
      if (shouldOutput(expression) || expression.hasElse()) {
        appendIdentifier((expression != null) ? expression.getActualElseIdentifier() : ELSE, ELSE);
      }

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

      // Else expression
      if (stateObject.hasElse()) {
        stateObject.getElse().accept(this);
      }

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

      // END
      if (shouldOutput(expression) || expression.hasEnd()) {
        appendIdentifier((expression != null) ? expression.getActualEndIdentifier() : END, END);
      }
    }
  }
View Full Code Here

TOP

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

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.