Package org.hibernate.loader.plan.spi

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


            new FetchStrategy( FetchTiming.IMMEDIATE, FetchStyle.SELECT )
        );
      }
    }
    else {
      return new CompositeFetch(
          (SessionFactoryImplementor) attributeNode.entityManagerFactory().getSessionFactory(),
          fetchOwner,
          attributeNode.getAttributeName()
      );
    }
View Full Code Here


      final EntityFetch entityFetch = (EntityFetch) fetch;
      printWriter.println( extractDetails( entityFetch ) );
      writeEntityReferenceFetches( entityFetch, depth+1, printWriter );
    }
    else if ( CompositeFetch.class.isInstance( fetch ) ) {
      final CompositeFetch compositeFetch = (CompositeFetch) fetch;
      printWriter.println( extractDetails( compositeFetch ) );
      writeCompositeFetchFetches( compositeFetch, depth+1, printWriter );
    }
    else if ( CollectionAttributeFetch.class.isInstance( fetch ) ) {
      final CollectionAttributeFetch collectionFetch = (CollectionAttributeFetch) fetch;
View Full Code Here

        final EntityReference indexGraphAsEntityReference = (EntityReference) indexGraph;
        printWriter.println( extractDetails( indexGraphAsEntityReference ) );
        writeEntityReferenceFetches( indexGraphAsEntityReference, depth+1, printWriter );
      }
      else if ( CompositeFetch.class.isInstance( indexGraph ) ) {
        final CompositeFetch indexGraphAsCompositeFetch = (CompositeFetch) indexGraph;
        printWriter.println( extractDetails( indexGraphAsCompositeFetch ) );
        writeCompositeFetchFetches( indexGraphAsCompositeFetch, depth+1, printWriter );
      }
    }

    final CollectionFetchableElement elementGraph = collectionReference.getElementGraph();
    if ( elementGraph != null ) {
      printWriter.print( TreePrinterHelper.INSTANCE.generateNodePrefix( depth ) + "(collection element) " );

      if ( EntityReference.class.isInstance( elementGraph ) ) {
        final EntityReference elementGraphAsEntityReference = (EntityReference) elementGraph;
        printWriter.println( extractDetails( elementGraphAsEntityReference ) );
        writeEntityReferenceFetches( elementGraphAsEntityReference, depth+1, printWriter );
      }
      else if ( CompositeFetch.class.isInstance( elementGraph ) ) {
        final CompositeFetch elementGraphAsCompositeFetch = (CompositeFetch) elementGraph;
        printWriter.println( extractDetails( elementGraphAsCompositeFetch ) );
        writeCompositeFetchFetches( elementGraphAsCompositeFetch, depth+1, printWriter );
      }
    }
  }
View Full Code Here

  public void foundAny(AnyMappingDefinition anyDefinition) {
    // do nothing.
  }

  protected boolean handleCompositeAttribute(AttributeDefinition attributeDefinition) {
    final CompositeFetch compositeFetch = currentSource().buildCompositeAttributeFetch( attributeDefinition );
    pushToStack( (ExpandingFetchSource) compositeFetch );
    return true;
  }
View Full Code Here

            new FetchStrategy( FetchTiming.IMMEDIATE, FetchStyle.SELECT )
        );
      }
    }
    else {
      return new CompositeFetch(
          (SessionFactoryImplementor) attributeNode.entityManagerFactory().getSessionFactory(),
          fetchOwner,
          attributeNode.getAttributeName()
      );
    }
View Full Code Here

  public static CompositeFetch buildStandardCompositeFetch(
      FetchOwner fetchOwner,
      CompositionDefinition attributeDefinition,
      LoadPlanBuildingContext loadPlanBuildingContext) {
    return new CompositeFetch(
        loadPlanBuildingContext.getSessionFactory(),
        fetchOwner,
        attributeDefinition.getName()
    );
  }
View Full Code Here

      final EntityFetch entityFetch = (EntityFetch) fetch;
      printWriter.println( extractDetails( entityFetch ) );
      writeEntityReferenceFetches( entityFetch, depth+1, printWriter );
    }
    else if ( CompositeFetch.class.isInstance( fetch ) ) {
      final CompositeFetch compositeFetch = (CompositeFetch) fetch;
      printWriter.println( extractDetails( compositeFetch ) );
      writeCompositeFetchFetches( compositeFetch, depth+1, printWriter );
    }
    else if ( CollectionAttributeFetch.class.isInstance( fetch ) ) {
      final CollectionAttributeFetch collectionFetch = (CollectionAttributeFetch) fetch;
View Full Code Here

          final EntityReference indexGraphAsEntityReference = (EntityReference) indexGraph;
          printWriter.println( extractDetails( indexGraphAsEntityReference ) );
          writeEntityReferenceFetches( indexGraphAsEntityReference, depth+1, printWriter );
        }
        else if ( CompositeFetch.class.isInstance( indexGraph ) ) {
          final CompositeFetch indexGraphAsCompositeFetch = (CompositeFetch) indexGraph;
          printWriter.println( extractDetails( indexGraphAsCompositeFetch ) );
          writeCompositeFetchFetches( indexGraphAsCompositeFetch, depth+1, printWriter );
        }
      }
    }

    final CollectionFetchableElement elementGraph = collectionReference.getElementGraph();
    if ( elementGraph != null ) {
      printWriter.print( TreePrinterHelper.INSTANCE.generateNodePrefix( depth ) + "(collection element) " );

      if ( EntityReference.class.isInstance( elementGraph ) ) {
        final EntityReference elementGraphAsEntityReference = (EntityReference) elementGraph;
        printWriter.println( extractDetails( elementGraphAsEntityReference ) );
        writeEntityReferenceFetches( elementGraphAsEntityReference, depth+1, printWriter );
      }
      else if ( CompositeFetch.class.isInstance( elementGraph ) ) {
        final CompositeFetch elementGraphAsCompositeFetch = (CompositeFetch) elementGraph;
        printWriter.println( extractDetails( elementGraphAsCompositeFetch ) );
        writeCompositeFetchFetches( elementGraphAsCompositeFetch, depth+1, printWriter );
      }
    }
  }
View Full Code Here

  public void foundAny(AnyMappingDefinition anyDefinition) {
    // do nothing.
  }

  protected boolean handleCompositeAttribute(AttributeDefinition attributeDefinition) {
    final CompositeFetch compositeFetch = currentSource().buildCompositeAttributeFetch( attributeDefinition );
    pushToStack( (ExpandingFetchSource) compositeFetch );
    return true;
  }
View Full Code Here

    );
  }

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

TOP

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

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.