Package org.hibernate.loader.plan.spi

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


    // if we get here, it is a root
    if ( ! supportsRootCollectionReturns() ) {
      throw new HibernateException( "This strategy does not support root collection returns" );
    }

    final CollectionReturn collectionReturn = new CollectionReturnImpl( collectionDefinition, querySpaces );
    pushToCollectionStack( collectionReturn );
    addRootReturn( collectionReturn );

    associationKeyRegistered(
        new AssociationKey(
View Full Code Here


          select,
          getReaderCollector()
      );
    }
    else if ( CollectionReturn.class.isInstance( rootReturn ) ) {
      final CollectionReturn collectionReturn = (CollectionReturn) rootReturn;
      if ( collectionReturn.getElementGraph() != null ) {
        fetchStats = queryProcessor.processFetches(
            collectionReturn.getElementGraph(),
            select,
            getReaderCollector()
        );
      }
      // TODO: what about index???
View Full Code Here

   */
  public static LoadQueryDetails makeCollectionLoadQueryDetails(
      CollectionPersister collectionPersister,
      LoadPlan loadPlan,
      QueryBuildingParameters buildingParameters) {
    final CollectionReturn rootReturn = RootHelper.INSTANCE.extractRootReturn( loadPlan, CollectionReturn.class );
    final AliasResolutionContextImpl aliasResolutionContext = new AliasResolutionContextImpl(
        collectionPersister.getFactory()
    );
    return collectionPersister.isOneToMany() ?
        new OneToManyLoadQueryDetails(
View Full Code Here

    // if we get here, it is a root
    if ( ! supportsRootCollectionReturns() ) {
      throw new HibernateException( "This strategy does not support root collection returns" );
    }

    final CollectionReturn collectionReturn = new CollectionReturnImpl( collectionDefinition, querySpaces );
    pushToCollectionStack( collectionReturn );
    addRootReturn( collectionReturn );

    associationKeyRegistered(
        new AssociationKey(
View Full Code Here

   */
  public static CollectionLoadQueryDetails makeForBatching(
      LoadPlan loadPlan,
      QueryBuildingParameters buildingParameters,
      SessionFactoryImplementor factory) {
    final CollectionReturn rootReturn = Helper.INSTANCE.extractRootReturn( loadPlan, CollectionReturn.class );
    final AliasResolutionContextImpl aliasResolutionContext = new AliasResolutionContextImpl( factory );
    return new OneToManyLoadQueryDetails(
            loadPlan,
            aliasResolutionContext,
            rootReturn,
View Full Code Here

   */
  public static CollectionLoadQueryDetails makeForBatching(
      LoadPlan loadPlan,
      QueryBuildingParameters buildingParameters,
      SessionFactoryImplementor factory) {
    final CollectionReturn rootReturn = Helper.INSTANCE.extractRootReturn( loadPlan, CollectionReturn.class );
    final AliasResolutionContextImpl aliasResolutionContext = new AliasResolutionContextImpl( factory );
    return new BasicCollectionLoadQueryDetails(
            loadPlan,
            aliasResolutionContext,
            rootReturn,
View Full Code Here

          select,
          getReaderCollector()
      );
    }
    else if ( CollectionReturn.class.isInstance( rootReturn ) ) {
      final CollectionReturn collectionReturn = (CollectionReturn) rootReturn;
      if ( collectionReturn.getElementGraph() != null ) {
        fetchStats = queryProcessor.processFetches(
            collectionReturn.getElementGraph(),
            select,
            getReaderCollector()
        );
      }
      // TODO: what about index???
View Full Code Here

    if ( fetchOwnerStack.isEmpty() ) {
      // this is a root...
      if ( ! supportsRootCollectionReturns() ) {
        throw new HibernateException( "This strategy does not support root collection returns" );
      }
      final CollectionReturn collectionReturn = buildRootCollectionReturn( collectionDefinition );
      addRootReturn( collectionReturn );
      pushToCollectionStack( collectionReturn );
    }
  }
View Full Code Here

      strategy.handleEntityReturn( (EntityReturn) rootReturn );
      visitFetches( (EntityReturn) rootReturn );
    }
    else if ( CollectionReturn.class.isInstance( rootReturn ) ) {
      strategy.handleCollectionReturn( (CollectionReturn) rootReturn );
      final CollectionReturn collectionReturn = (CollectionReturn) rootReturn;
      visitFetches( collectionReturn.getIndexGraph() );
      visitFetches( collectionReturn.getElementGraph() );
    }
    else {
      throw new IllegalStateException(
          "Unexpected return type encountered; expecting a non-scalar root return, but found " +
              rootReturn.getClass().getName()
View Full Code Here

  @Override
  protected CollectionReturn buildRootCollectionReturn(CollectionDefinition collectionDefinition) {
    final CollectionPersister persister = collectionDefinition.getCollectionPersister();
    final String collectionRole = persister.getRole();
    return new CollectionReturn(
        sessionFactory(),
        LockMode.NONE, // todo : for now
        persister.getOwnerEntityPersister().getEntityName(),
        StringHelper.unqualify( collectionRole )
    );
View Full Code Here

TOP

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

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.