Package org.hibernate.loader.plan.exec.process.internal

Examples of org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl


        new CollectionReferenceInitializerImpl( rootReturn, collectionReferenceAliases )
    );
    if ( rootReturn.getCollectionPersister().getElementType().isEntityType() ) {
      final EntityReference elementEntityReference = rootReturn.getElementGraph().resolveEntityReference();
      readerCollector.add(
        new EntityReferenceInitializerImpl( elementEntityReference, collectionReferenceAliases.getEntityElementAliases() )
      );
    }
    if ( rootReturn.getCollectionPersister().hasIndex() &&
        rootReturn.getCollectionPersister().getIndexType().isEntityType() ) {
      final EntityReference indexEntityReference = rootReturn.getIndexGraph().resolveEntityReference();
      final EntityReferenceAliases indexEntityReferenceAliases = aliasResolutionContext.generateEntityReferenceAliases(
          indexEntityReference.getQuerySpaceUid(),
          indexEntityReference.getEntityPersister()
      );
      readerCollector.add(
          new EntityReferenceInitializerImpl( indexEntityReference, indexEntityReferenceAliases )
      );
    }
  }
View Full Code Here


        rootReturn.getQuerySpaceUid(),
        rootReturn.getEntityPersister()
    );
    this.readerCollector = new EntityLoaderReaderCollectorImpl(
        new EntityReturnReader( rootReturn ),
        new EntityReferenceInitializerImpl( rootReturn, entityReferenceAliases, true )
    );
    generate();
  }
View Full Code Here

        );
      }
    }

    // build an EntityReferenceInitializers for the incoming fetch itself
    readerCollector.add( new EntityReferenceInitializerImpl( fetch, aliases ) );

    // then visit each of our (non-identifier) fetches
    processFetches( fetch, selectStatementBuilder, readerCollector, fetchStats );
  }
View Full Code Here

      if ( StringHelper.isNotEmpty( ordering ) ) {
        selectStatementBuilder.appendOrderByFragment( ordering );
      }

      readerCollector.add(
          new EntityReferenceInitializerImpl(
              (EntityReference) fetch.getElementGraph(),
              aliasResolutionContext.resolveEntityReferenceAliases( fetch.getElementGraph().getQuerySpaceUid() )
          )
      );
    }
    else {
      // select the "collection columns"
      selectStatementBuilder.appendSelectClauseFragment(
          queryableCollection.selectFragment(
              aliases.getElementTableAlias(),
              aliases.getCollectionColumnAliases().getSuffix()
          )
      );

      if ( fetch.getCollectionPersister().isOneToMany() ) {
        // if the collection elements are entities, select the entity columns as well
        final OuterJoinLoadable elementPersister = (OuterJoinLoadable) queryableCollection.getElementPersister();
        selectStatementBuilder.appendSelectClauseFragment(
            elementPersister.selectFragment(
                aliases.getElementTableAlias(),
                aliases.getEntityElementAliases().getColumnAliases().getSuffix()
            )
        );
        readerCollector.add(
            new EntityReferenceInitializerImpl(
                (EntityReference) fetch.getElementGraph(),
                aliasResolutionContext.resolveEntityReferenceAliases( fetch.getElementGraph().getQuerySpaceUid() )
            )
        );
      }
View Full Code Here

        );
      }
    }

    // build an EntityReferenceInitializers for the incoming fetch itself
    readerCollector.add( new EntityReferenceInitializerImpl( fetch, aliases ) );

    // then visit each of our (non-identifier) fetches
    processFetches( fetch, selectStatementBuilder, readerCollector, fetchStats );
  }
View Full Code Here

      if ( StringHelper.isNotEmpty( ordering ) ) {
        selectStatementBuilder.appendOrderByFragment( ordering );
      }

      readerCollector.add(
          new EntityReferenceInitializerImpl(
              (EntityReference) fetch.getElementGraph(),
              aliasResolutionContext.resolveEntityReferenceAliases( fetch.getElementGraph().getQuerySpaceUid() )
          )
      );
    }
    else {
      // select the "collection columns"
      selectStatementBuilder.appendSelectClauseFragment(
          queryableCollection.selectFragment(
              aliases.getElementTableAlias(),
              aliases.getCollectionColumnAliases().getSuffix()
          )
      );

      if ( fetch.getCollectionPersister().isOneToMany() ) {
        // if the collection elements are entities, select the entity columns as well
        final OuterJoinLoadable elementPersister = (OuterJoinLoadable) queryableCollection.getElementPersister();
        selectStatementBuilder.appendSelectClauseFragment(
            elementPersister.selectFragment(
                aliases.getElementTableAlias(),
                aliases.getEntityElementAliases().getColumnAliases().getSuffix()
            )
        );
        readerCollector.add(
            new EntityReferenceInitializerImpl(
                (EntityReference) fetch.getElementGraph(),
                aliasResolutionContext.resolveEntityReferenceAliases( fetch.getElementGraph().getQuerySpaceUid() )
            )
        );
      }
View Full Code Here

      aliasResolutionContext.registerQuerySpaceAliases(
          elementEntityReference.getQuerySpaceUid(),
          elementEntityReferenceAliases
      );
      readerCollector.add(
        new EntityReferenceInitializerImpl( elementEntityReference, elementEntityReferenceAliases )
      );
    }
    if ( rootReturn.getCollectionPersister().hasIndex() &&
        rootReturn.getCollectionPersister().getIndexType().isEntityType() ) {
      final EntityReference indexEntityReference = rootReturn.getIndexGraph().resolveEntityReference();
      final EntityReferenceAliases indexEntityReferenceAliases = aliasResolutionContext.generateEntityReferenceAliases(
          indexEntityReference.getQuerySpaceUid(),
          indexEntityReference.getEntityPersister()
      );
      readerCollector.add(
          new EntityReferenceInitializerImpl( indexEntityReference, indexEntityReferenceAliases )
      );
    }
  }
View Full Code Here

        rootReturn.getQuerySpaceUid(),
        rootReturn.getEntityPersister()
    );
    this.readerCollector = new EntityLoaderReaderCollectorImpl(
        new EntityReturnReader( rootReturn ),
        new EntityReferenceInitializerImpl( rootReturn, entityReferenceAliases, true )
    );
    generate();
  }
View Full Code Here

        );
      }
    }

    // build an EntityReferenceInitializers for the incoming fetch itself
    readerCollector.add( new EntityReferenceInitializerImpl( fetch, aliases ) );

    // then visit each of our (non-identifier) fetches
    processFetches( fetch, selectStatementBuilder, readerCollector, fetchStats );
  }
View Full Code Here

          aliases.getCollectionTableAlias(),
          aliases.getEntityElementColumnAliases()
      );
      aliasResolutionContext.registerQuerySpaceAliases( fetch.getQuerySpaceUid(), entityReferenceAliases );
      readerCollector.add(
          new EntityReferenceInitializerImpl(
              (EntityReference) fetch.getElementGraph(),
              entityReferenceAliases
          )
      );
    }
    else {
      // select the "collection columns"
      selectStatementBuilder.appendSelectClauseFragment(
          queryableCollection.selectFragment(
              aliases.getElementTableAlias(),
              aliases.getCollectionColumnAliases().getSuffix()
          )
      );

      if ( fetch.getCollectionPersister().isOneToMany() ) {
        // if the collection elements are entities, select the entity columns as well
        final OuterJoinLoadable elementPersister = (OuterJoinLoadable) queryableCollection.getElementPersister();
        selectStatementBuilder.appendSelectClauseFragment(
            elementPersister.selectFragment(
                aliases.getElementTableAlias(),
                aliases.getEntityElementColumnAliases().getSuffix()
            )
        );
        final EntityReferenceAliases entityReferenceAliases = new EntityReferenceAliasesImpl(
            aliases.getElementTableAlias(),
            aliases.getEntityElementColumnAliases()
        );
        aliasResolutionContext.registerQuerySpaceAliases( fetch.getQuerySpaceUid(), entityReferenceAliases );
        readerCollector.add(
            new EntityReferenceInitializerImpl(
                (EntityReference) fetch.getElementGraph(),
                entityReferenceAliases
            )
        );
      }
View Full Code Here

TOP

Related Classes of org.hibernate.loader.plan.exec.process.internal.EntityReferenceInitializerImpl

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.