Package org.hibernate.loader.plan.spi

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


      final EntityReturn entityReturn = (EntityReturn) rootReturn;
      printWriter.println( extractDetails( entityReturn ) );
      writeEntityReferenceFetches( entityReturn, depth+1, printWriter );
    }
    else if ( CollectionReference.class.isInstance( rootReturn ) ) {
      final CollectionReference collectionReference = (CollectionReference) rootReturn;
      printWriter.println( extractDetails( collectionReference ) );
      writeCollectionReferenceFetches( collectionReference, depth+1, printWriter );
    }

    printWriter.flush();
View Full Code Here


    propertyPathStack.push( collectionReference.getPropertyPath() );
    collectionReferenceStack.addFirst( collectionReference );
  }

  private CollectionReference popFromCollectionStack() {
    final CollectionReference last = collectionReferenceStack.removeFirst();
    log.trace( "Popped collection reference from stack : " + last );
    propertyPathStack.pop();
    return last;
  }
View Full Code Here

    if ( !isRoot ) {
      // if not, this call should represent a fetch which will be handled in #finishingAttribute
      return;
    }

    final CollectionReference popped = popFromCollectionStack();
    checkedPoppedCollection( popped, collectionDefinition );

    log.tracef(
        "%s Finished root collection : %s",
        StringHelper.repeat( "<<", fetchSourceStack.size() ),
View Full Code Here

        "%s Starting collection index graph : %s",
        StringHelper.repeat( ">>", fetchSourceStack.size() ),
        indexDefinition.getCollectionDefinition().getCollectionPersister().getRole()
    );

    final CollectionReference collectionReference = currentCollection();
    final CollectionFetchableIndex indexGraph = collectionReference.getIndexGraph();

    if ( indexType.isEntityType() || indexType.isComponentType() ) {
      if ( indexGraph == null ) {
        throw new WalkingException(
            "CollectionReference did not return an expected index graph : " +
View Full Code Here

        "%s Starting collection element graph : %s",
        StringHelper.repeat( ">>", fetchSourceStack.size() ),
        elementDefinition.getCollectionDefinition().getCollectionPersister().getRole()
    );

    final CollectionReference collectionReference = currentCollection();
    final CollectionFetchableElement elementGraph = collectionReference.getElementGraph();

    if ( elementType.isAssociationType() || elementType.isComponentType() ) {
      if ( elementGraph == null ) {
        throw new IllegalStateException(
            "CollectionReference did not return an expected element graph : " +
View Full Code Here

          final ExpandingFetchSource popped = popFromStack();
          checkPoppedEntity( popped, associationAttributeDefinition.toEntityDefinition() );
        }
      }
      else if ( attributeType.isCollectionType() ) {
        final CollectionReference currentCollection = currentCollection();
        // One way to find out if the fetch was pushed is to check the fetch strategy; rather than recomputing
        // the fetch strategy, simply check if current collection's fetched attribute definition matches
        // associationAttributeDefinition.
        if ( AttributeFetch.class.isInstance( currentCollection ) &&
            associationAttributeDefinition.equals( AttributeFetch.class.cast( currentCollection ).getFetchedAttributeDefinition() ) ) {
          final CollectionReference popped = popFromCollectionStack();
          checkedPoppedCollection( popped, associationAttributeDefinition.toCollectionDefinition() );
        }
      }
    }
    else if ( attributeType.isComponentType() ) {
View Full Code Here

      final EntityReturn entityReturn = (EntityReturn) rootReturn;
      printWriter.println( extractDetails( entityReturn ) );
      writeEntityReferenceFetches( entityReturn, depth+1, printWriter );
    }
    else if ( CollectionReference.class.isInstance( rootReturn ) ) {
      final CollectionReference collectionReference = (CollectionReference) rootReturn;
      printWriter.println( extractDetails( collectionReference ) );
      writeCollectionReferenceFetches( collectionReference, depth+1, printWriter );
    }

    printWriter.flush();
View Full Code Here

    propertyPathStack.push( collectionReference.getPropertyPath() );
    collectionReferenceStack.addFirst( collectionReference );
  }

  private CollectionReference popFromCollectionStack() {
    final CollectionReference last = collectionReferenceStack.removeFirst();
    log.trace( "Popped collection reference from stack : " + last );
    propertyPathStack.pop();
    if ( FetchStackAware.class.isInstance( last ) ) {
      ( (FetchStackAware) last ).poppedFromStack();
    }
View Full Code Here

    if ( !isRoot ) {
      // if not, this call should represent a fetch which will be handled in #finishingAttribute
      return;
    }

    final CollectionReference popped = popFromCollectionStack();
    checkedPoppedCollection( popped, collectionDefinition );

    log.tracef(
        "%s Finished root collection : %s",
        StringHelper.repeat( "<<", fetchSourceStack.size() ),
View Full Code Here

        "%s Starting collection index graph : %s",
        StringHelper.repeat( ">>", fetchSourceStack.size() ),
        indexDefinition.getCollectionDefinition().getCollectionPersister().getRole()
    );

    final CollectionReference collectionReference = currentCollection();
    final CollectionFetchableIndex indexGraph = collectionReference.getIndexGraph();

    if ( indexType.isEntityType() || indexType.isComponentType() ) {
      if ( indexGraph == null ) {
        throw new WalkingException(
            "CollectionReference did not return an expected index graph : " +
View Full Code Here

TOP

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

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.