Package org.hibernate.loader.plan.build.spi

Examples of org.hibernate.loader.plan.build.spi.ExpandingFetchSource


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

    final ExpandingFetchSource currentSource = currentSource();
    currentSource.validateFetchPlan( fetchStrategy, attributeDefinition );

    final AssociationAttributeDefinition.AssociationNature nature = attributeDefinition.getAssociationNature();
    if ( nature == AssociationAttributeDefinition.AssociationNature.ANY ) {
      // for ANY mappings we need to build a Fetch:
      //    1) fetch type is SELECT
      //    2) (because the fetch cannot be a JOIN...) do not push it to the stack
      currentSource.buildAnyAttributeFetch(
          attributeDefinition,
          fetchStrategy
      );
      return false;
    }
    else if ( nature == AssociationAttributeDefinition.AssociationNature.ENTITY ) {
      EntityFetch fetch = currentSource.buildEntityAttributeFetch(
          attributeDefinition,
          fetchStrategy
      );
      if ( fetchStrategy.getStyle() == FetchStyle.JOIN ) {
        pushToStack( (ExpandingFetchSource) fetch );
        return true;
      }
      else {
        return false;
      }
    }
    else {
      // Collection
      CollectionAttributeFetch fetch = currentSource.buildCollectionAttributeFetch( attributeDefinition, fetchStrategy );
      if ( fetchStrategy.getStyle() == FetchStyle.JOIN ) {
        pushToCollectionStack( fetch );
        return true;
      }
      else {
View Full Code Here

TOP

Related Classes of org.hibernate.loader.plan.build.spi.ExpandingFetchSource

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.