Package org.hibernate.loader.plan.spi

Examples of org.hibernate.loader.plan.spi.FetchOwner


  }

  @Override
  public void finishingCompositeCollectionElement(CompositeCollectionElementDefinition compositeElementDefinition) {
    // pop the current fetch owner, and make sure what we just popped represents this composition
    final FetchOwner poppedFetchOwner = popFromStack();

    if ( ! CompositeElementGraph.class.isInstance( poppedFetchOwner ) ) {
      throw new WalkingException( "Mismatched FetchOwner from stack on pop" );
    }
View Full Code Here


  }

  @Override
  public void finishingComposite(CompositionDefinition compositionDefinition) {
    // pop the current fetch owner, and make sure what we just popped represents this composition
    final FetchOwner poppedFetchOwner = popFromStack();

    if ( ! CompositeFetch.class.isInstance( poppedFetchOwner ) ) {
      throw new WalkingException( "Mismatched FetchOwner from stack on pop" );
    }
View Full Code Here

        attributeDefinition
    );
  }

  protected boolean handleCompositeAttribute(CompositionDefinition attributeDefinition) {
    final FetchOwner fetchOwner = currentFetchOwner();
    final CompositeFetch fetch = fetchOwner.buildCompositeFetch( attributeDefinition, this );
    pushToStack( fetch );
    return true;
  }
View Full Code Here

    final FetchStrategy fetchStrategy = determineFetchPlan( attributeDefinition );
    if ( fetchStrategy.getTiming() != FetchTiming.IMMEDIATE ) {
      return false;
    }

    final FetchOwner fetchOwner = currentFetchOwner();
    fetchOwner.validateFetchPlan( fetchStrategy );

    final Fetch associationFetch;
    if ( attributeDefinition.isCollection() ) {
      associationFetch = fetchOwner.buildCollectionFetch( attributeDefinition, fetchStrategy, this );
      pushToCollectionStack( (CollectionReference) associationFetch );
    }
    else {
      associationFetch = fetchOwner.buildEntityFetch(
          attributeDefinition,
          fetchStrategy,
          this
      );
    }
View Full Code Here

  private MDCStack mdcStack() {
    return (MDCStack) MDC.get( MDC_KEY );
  }

  private FetchOwner popFromStack() {
    final FetchOwner last = fetchOwnerStack.removeFirst();
    log.trace( "Popped fetch owner from stack : " + last );
    mdcStack().pop();
    if ( FetchStackAware.class.isInstance( last ) ) {
      ( (FetchStackAware) last ).poppedFromStack();
    }
View Full Code Here

TOP

Related Classes of org.hibernate.loader.plan.spi.FetchOwner

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.