Package org.hibernate.loader.plan.spi

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


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


  private void writeFetch(Fetch fetch, int depth, PrintWriter printWriter) {
    printWriter.print( TreePrinterHelper.INSTANCE.generateNodePrefix( depth ) );

    if ( EntityFetch.class.isInstance( fetch ) ) {
      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;
View Full Code Here

          fetchStrategy
      );
      return false;
    }
    else if ( nature == AssociationAttributeDefinition.AssociationNature.ENTITY ) {
      EntityFetch fetch = currentSource.buildEntityAttributeFetch(
          attributeDefinition,
          fetchStrategy
      );
      if ( fetchStrategy.getStyle() == FetchStyle.JOIN ) {
        pushToStack( (ExpandingFetchSource) fetch );
View Full Code Here

      );
      targetEntityReferenceInitializer.hydrateEntityState( resultSet, context );
    }
    for ( Fetch fetch : fetchSource.getFetches() ) {
      if ( EntityFetch.class.isInstance( fetch ) ) {
        final EntityFetch entityFetch = (EntityFetch) fetch;
        final EntityReferenceInitializer  entityReferenceInitializer = initializerByEntityReference.get( entityFetch );
        if ( entityReferenceInitializer != null ) {
          resolveEntityKey(
              resultSet,
              context,
View Full Code Here

    if ( ! FetchStrategyHelper.isJoinFetched( fetch.getFetchStrategy() ) ) {
      return;
    }

    if ( EntityFetch.class.isInstance( fetch ) ) {
      final EntityFetch entityFetch = (EntityFetch) fetch;
      processEntityFetch(
          selectStatementBuilder,
          fetchSource,
          entityFetch,
          readerCollector,
View Full Code Here

    );
  }

  private void handleMissingIdentifier(ResultSetProcessingContext context) {
    if ( EntityFetch.class.isInstance( entityReference ) ) {
      final EntityFetch fetch = (EntityFetch) entityReference;
      final EntityType fetchedType = fetch.getFetchedType();
      if ( ! fetchedType.isOneToOne() ) {
        return;
      }

      final EntityReferenceProcessingState fetchOwnerState = context.getOwnerProcessingState( fetch );
View Full Code Here

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

        expandingQuerySpace(),
        attributeDefinition,
        getQuerySpaces().generateImplicitUid(),
        fetchStrategy
    );
    final EntityFetch fetch = new EntityAttributeFetchImpl( this, attributeDefinition, fetchStrategy, entityQuerySpace );
    addFetch( fetch );
    return fetch;
  }
View Full Code Here

    if ( ! FetchStrategyHelper.isJoinFetched( fetch.getFetchStrategy() ) ) {
      return;
    }

    if ( EntityFetch.class.isInstance( fetch ) ) {
      final EntityFetch entityFetch = (EntityFetch) fetch;
      processEntityFetch(
          selectStatementBuilder,
          fetchSource,
          entityFetch,
          readerCollector,
View Full Code Here

        LoadPlanBuildingContext loadPlanBuildingContext) {
      // we have a key-many-to-one
      //
      // IMPL NOTE: we pass ourselves as the FetchOwner which will route the fetch back through our #addFetch
      //     impl.  We collect them there and later build the IdentifierDescription
      final EntityFetch fetch = super.buildEntityFetch( attributeDefinition, fetchStrategy, loadPlanBuildingContext );
      fetchToHydratedStateExtractorMap.put( fetch, attributeDefinition.getHydratedCompoundValueExtractor() );

      return fetch;
    }
View Full Code Here

TOP

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

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.