Package org.eclipse.persistence.jpa.jpql.tools.model.query

Examples of org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject


      WhereClauseStateObject whereClause = stateObject.addWhereClause();
      whereClause.setExpression(expression);

      expression.getConditionalExpression().accept(BasicStateObjectBuilder.this);
      StateObject conditionalStateObject = BasicStateObjectBuilder.this.stateObject;

      whereClause.setConditional(conditionalStateObject);
    }
View Full Code Here


      selectClause.setExpression(expression);
      selectClause.setDistinct(expression.hasDistinct());

      for (Expression child : children(expression.getSelectExpression())) {

        StateObject stateObject = getSelectItemBuilder().buildStateObject(selectClause, child);

        if (stateObject != null) {
          selectClause.addItem(stateObject);
        }
      }
View Full Code Here

        if (!updateClause.isIdentificationVariableDefined()) {
          updateItem.setVirtualIdentificationVariable(updateClause.getIdentificationVariable());
        }

        // Create the new value
        StateObject stateObject = buildStateObjectImp(expression.getNewValue());
        updateItem.setNewValue(stateObject);
      }
      finally {
        updateItem = null;
      }
View Full Code Here

    public void visit(WhereClause expression) {

      WhereClauseStateObject whereClause = stateObject.addWhereClause();
      whereClause.setExpression(expression);

      StateObject stateObject = buildStateObjectImp(expression.getConditionalExpression());
      whereClause.setConditional(stateObject);
    }
View Full Code Here

     * {@inheritDoc}
     */
    @Override
    public void visit(WhenClause expression) {

      StateObject whenStateObject = buildStateObjectImp(expression.getWhenExpression());
      StateObject thenStateObject = buildStateObjectImp(expression.getThenExpression());

      WhenClauseStateObject stateObject = parent.addWhenClause(whenStateObject, thenStateObject);
      stateObject.setExpression(expression);
    }
View Full Code Here

   */
  protected void toText(StateObject stateObject) {

    if (stateObject.isDecorated()) {

      StateObject decorator = stateObject.getDecorator();
      stateObject.decorate(null);

      try {
        decorator.accept(this);
      }
      finally {
        stateObject.decorate(decorator);
      }
    }
View Full Code Here

  }

  @SuppressWarnings("unchecked")
  protected <T extends StateObject> List<T> buildChildren(Expression expression) {

    StateObject oldStateObject = stateObject;
    List<T> stateObjects = new ArrayList<T>();

    for (Expression child : children(expression)) {
      child.accept(this);
      stateObjects.add((T) stateObject);
View Full Code Here

   */
  @Override
  public void visit(AdditionExpression expression) {

    expression.getLeftExpression().accept(this);
    StateObject leftStateObject = stateObject;

    expression.getRightExpression().accept(this);
    StateObject rightStateObject = stateObject;

    AdditionExpressionStateObject stateObject = new AdditionExpressionStateObject(
      parent,
      leftStateObject,
      rightStateObject
View Full Code Here

   */
  @Override
  public void visit(AndExpression expression) {

    expression.getLeftExpression().accept(this);
    StateObject leftStateObject = stateObject;

    expression.getRightExpression().accept(this);
    StateObject rightStateObject = stateObject;

    AndExpressionStateObject stateObject = new AndExpressionStateObject(
      parent,
      leftStateObject,
      rightStateObject
View Full Code Here

   */
  @Override
  public void visit(BetweenExpression expression) {

    expression.getExpression().accept(this);
    StateObject betweenStateObject = stateObject;

    expression.getLowerBoundExpression().accept(this);
    StateObject lowerBoundStateObject = stateObject;

    expression.getUpperBoundExpression().accept(this);
    StateObject upperBoundStateObject = stateObject;

    BetweenExpressionStateObject stateObject = new BetweenExpressionStateObject(
      parent,
      betweenStateObject,
      expression.hasNot(),
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.jpa.jpql.tools.model.query.StateObject

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.