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

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


    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

  /**
   * {@inheritDoc}
   */
  @Override
  public IEclipseLinkSelectExpressionStateObjectBuilder variable(String variable) {
    StateObject stateObject = buildIdentificationVariable(variable);
    add(stateObject);
    return this;
  }
View Full Code Here

    // it is possible the state model uses this builder to create some objects
    BasicStateObjectBuilder builder  = getStateObjectBuilder();
    IJPQLQueryBuilder oldBuilder     = builder.jpqlQueryBuilder;
    IManagedTypeProvider oldProvider = builder.managedTypeProvider;
    JPQLQueryStateObject oldParent   = builder.parent;
    StateObject oldStateObject       = builder.stateObject;

    try {
      builder.jpqlQueryBuilder    = this;
      builder.managedTypeProvider = parent.getManagedTypeProvider();
      builder.parent              = parent.getRoot();
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public ISimpleSelectExpressionStateObjectBuilder variable(String variable) {
    StateObject stateObject = buildIdentificationVariable(variable);
    add(stateObject);
    return this;
  }
View Full Code Here

    allOrAny(ALL, subquery);
    return (T) this;
  }

  protected void allOrAny(String identifier, SimpleSelectStatementStateObject subquery) {
    StateObject stateObject = new AllOrAnyExpressionStateObject(getParent(), identifier, subquery);
    add(stateObject);
  }
View Full Code Here

   */
  public T and(T builder) {

    checkBuilder(builder);

    StateObject rightStateObject = pop();
    StateObject leftStateObject  = pop();

    StateObject stateObject = new AndExpressionStateObject(
      getParent(),
      leftStateObject,
      rightStateObject
    );

View Full Code Here

    return (T) this;
  }

  protected void between(boolean not) {

    StateObject upperBoundStateObject  = pop();
    StateObject lowerBoundStateObject  = pop();
    StateObject firstStateObject       = pop();

    StateObject stateObject = new BetweenExpressionStateObject(
      getParent(),
      firstStateObject,
      not,
      lowerBoundStateObject,
      upperBoundStateObject
View Full Code Here

  /**
   * {@inheritDoc}
   */
  public T collectionPath(String path) {
    StateObject stateObject = buildCollectionPath(path);
    add(stateObject);
    return (T) this;
  }
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.jpa.jpql.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.