Package org.hibernate.persister.walking.spi

Examples of org.hibernate.persister.walking.spi.AssociationAttributeDefinition


  @Override
  public void finishingAttribute(AttributeDefinition attributeDefinition) {
    final Type attributeType = attributeDefinition.getType();

    if ( attributeType.isAssociationType() ) {
      final AssociationAttributeDefinition associationAttributeDefinition =
          (AssociationAttributeDefinition) attributeDefinition;
      if ( attributeType.isAnyType() ) {
        // Nothing to do because AnyFetch does not implement ExpandingFetchSource (i.e., it cannot be pushed/popped).
      }
      else if ( attributeType.isEntityType() ) {
        final ExpandingFetchSource source = currentSource();
        // 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 source's fetched attribute definition matches
        // associationAttributeDefinition.
        if ( AttributeFetch.class.isInstance( source ) &&
            associationAttributeDefinition.equals( AttributeFetch.class.cast( source ).getFetchedAttributeDefinition() ) ) {
          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() ) {
      // CompositeFetch is always pushed, during #startingAttribute(),
View Full Code Here


            currentColumnPosition += columnSpan;

            if ( type.isAssociationType() ) {
              final AssociationType aType = (AssociationType) type;
              return new AssociationAttributeDefinition() {
                @Override
                public AssociationKey getAssociationKey() {
                  return new AssociationKey( lhsTableName, subAttributeLhsColumns );
                }
View Full Code Here

  @Override
  public void finishingAttribute(AttributeDefinition attributeDefinition) {
    final Type attributeType = attributeDefinition.getType();

    if ( attributeType.isAssociationType() ) {
      final AssociationAttributeDefinition associationAttributeDefinition =
          (AssociationAttributeDefinition) attributeDefinition;
      if ( attributeType.isAnyType() ) {
        // Nothing to do because AnyFetch does not implement ExpandingFetchSource (i.e., it cannot be pushed/popped).
      }
      else if ( attributeType.isEntityType() ) {
        final ExpandingFetchSource source = currentSource();
        // 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 source's fetched attribute definition matches
        // associationAttributeDefinition.
        if ( AttributeFetch.class.isInstance( source ) &&
            associationAttributeDefinition.equals( AttributeFetch.class.cast( source ).getFetchedAttributeDefinition() ) ) {
          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() ) {
      // CompositeFetch is always pushed, during #startingAttribute(),
View Full Code Here

            currentColumnPosition += columnSpan;

            if ( type.isAssociationType() ) {
              final AssociationType aType = (AssociationType) type;
              return new AssociationAttributeDefinition() {
                @Override
                public AssociationKey getAssociationKey() {
                  return new AssociationKey( lhsTableName, subAttributeLhsColumns );
                }
View Full Code Here

            currentColumnPosition += columnSpan;

            if ( type.isAssociationType() ) {
              final AssociationType aType = (AssociationType) type;
              return new AssociationAttributeDefinition() {
                @Override
                public AssociationKey getAssociationKey() {
                  /* TODO: is this always correct? */
                  //return new AssociationKey(
                  //    joinable.getTableName(),
View Full Code Here

  @Override
  public void finishingAttribute(AttributeDefinition attributeDefinition) {
    final Type attributeType = attributeDefinition.getType();

    if ( attributeType.isAssociationType() ) {
      final AssociationAttributeDefinition associationAttributeDefinition =
          (AssociationAttributeDefinition) attributeDefinition;
      if ( attributeType.isAnyType() ) {
        // Nothing to do because AnyFetch does not implement ExpandingFetchSource (i.e., it cannot be pushed/popped).
      }
      else if ( attributeType.isEntityType() ) {
        final ExpandingFetchSource source = currentSource();
        // 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 source's fetched attribute definition matches
        // associationAttributeDefinition.
        if ( AttributeFetch.class.isInstance( source ) &&
            associationAttributeDefinition.equals( AttributeFetch.class.cast( source ).getFetchedAttributeDefinition() ) ) {
          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() ) {
      // CompositeFetch is always pushed, during #startingAttribute(),
View Full Code Here

  @Override
  public void finishingAttribute(AttributeDefinition attributeDefinition) {
    final Type attributeType = attributeDefinition.getType();

    if ( attributeType.isAssociationType() ) {
      final AssociationAttributeDefinition associationAttributeDefinition =
          (AssociationAttributeDefinition) attributeDefinition;
      if ( attributeType.isAnyType() ) {
        // Nothing to do because AnyFetch does not implement ExpandingFetchSource (i.e., it cannot be pushed/popped).
      }
      else if ( attributeType.isEntityType() ) {
        final ExpandingFetchSource source = currentSource();
        // 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 source's fetched attribute definition matches
        // associationAttributeDefinition.
        if ( AttributeFetch.class.isInstance( source ) &&
            associationAttributeDefinition.equals( AttributeFetch.class.cast( source ).getFetchedAttributeDefinition() ) ) {
          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() ) {
      // CompositeFetch is always pushed, during #startingAttribute(),
View Full Code Here

TOP

Related Classes of org.hibernate.persister.walking.spi.AssociationAttributeDefinition

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.