Package org.hibernate.loader

Examples of org.hibernate.loader.PropertyPath


    public void pop() {
      pathStack.removeFirst();
    }

    public String toString() {
      final PropertyPath path = pathStack.peekFirst();
      return path == null ? "<no-path>" : path.getFullPath();
    }
View Full Code Here


      SessionFactoryImplementor sessionFactory,
      LockMode lockMode,
      String entityName) {
    super( sessionFactory );
    this.persister = sessionFactory.getEntityPersister( entityName );
    this.propertyPath = new PropertyPath( entityName );
    this.sqlSelectFragmentResolver = new EntityPersisterBasedSqlSelectFragmentResolver( (Queryable) persister );

    this.lockMode = lockMode;
  }
View Full Code Here

    super(
        sessionFactory,
        lockMode,
        sessionFactory.getCollectionPersister( ownerEntityName + '.' + ownerProperty ),
        // its a root
        new PropertyPath(),
        // no owner
        null
    );
    this.ownerEntityName = ownerEntityName;
    this.ownerProperty = ownerProperty;
View Full Code Here

    super(
        loadPlanBuildingContext.getQuerySpaces().makeEntityQuerySpace(
            loadPlanBuildingContext.getQuerySpaces().generateImplicitUid(),
            entityDefinition.getEntityPersister()
        ),
        new PropertyPath( entityDefinition.getEntityPersister().getEntityName() )
    );
  }
View Full Code Here

    super(
        (CollectionQuerySpaceImpl) context.getQuerySpaces().makeCollectionQuerySpace(
            context.getQuerySpaces().generateImplicitUid(),
            collectionDefinition.getCollectionPersister()
        ),
        new PropertyPath( "[" + collectionDefinition.getCollectionPersister().getRole() + "]" ),
        context
    );
  }
View Full Code Here

    public void pop() {
      pathStack.removeFirst();
    }

    public String toString() {
      final PropertyPath path = pathStack.peekFirst();
      return path == null ? "<no-path>" : path.getFullPath();
    }
View Full Code Here

      visitAttributeDefinition( attributeDefinition );
    }
  }

  private void visitAttributeDefinition(AttributeDefinition attributeDefinition) {
    final PropertyPath subPath = currentPropertyPath.append( attributeDefinition.getName() );
    log.debug( "Visiting attribute path : " + subPath.getFullPath() );

    final boolean continueWalk;
    if ( attributeDefinition.getType().isAssociationType() ) {
      continueWalk =
          ! isDuplicateAssociation( ( (AssociationAttributeDefinition) attributeDefinition ).getAssociationKey() ) &&
          strategy.startingAttribute( attributeDefinition );
    }
    else {
      continueWalk = strategy.startingAttribute( attributeDefinition );
    }
    if ( continueWalk ) {
      final PropertyPath old = currentPropertyPath;
      currentPropertyPath = subPath;
      try {
        if ( attributeDefinition.getType().isAssociationType() ) {
          visitAssociation( (AssociationAttributeDefinition) attributeDefinition );
        }
View Full Code Here

    public void pop() {
      pathStack.removeFirst();
    }

    public String toString() {
      final PropertyPath path = pathStack.peekFirst();
      return path == null ? "<no-path>" : path.getFullPath();
    }
View Full Code Here

      String ownerProperty) {
    super(
        sessionFactory,
        lockMode,
        sessionFactory.getCollectionPersister( ownerEntityName + '.' + ownerProperty ),
        new PropertyPath() // its a root
    );
    this.ownerEntityName = ownerEntityName;
    this.ownerProperty = ownerProperty;
  }
View Full Code Here

      visitAttributeDefinition( attributeDefinition );
    }
  }

  private void visitAttributeDefinition(AttributeDefinition attributeDefinition) {
    final PropertyPath subPath = currentPropertyPath.append( attributeDefinition.getName() );
    log.debug( "Visiting attribute path : " + subPath.getFullPath() );

    final boolean continueWalk;
    if ( attributeDefinition.getType().isAssociationType() &&
        isDuplicateAssociationKey( ( (AssociationAttributeDefinition) attributeDefinition ).getAssociationKey() ) ) {
      log.debug( "Property path deemed to be circular : " + subPath.getFullPath() );
      continueWalk = false;
    }
    else {
      continueWalk = strategy.startingAttribute( attributeDefinition );
    }
    if ( continueWalk ) {
      final PropertyPath old = currentPropertyPath;
      currentPropertyPath = subPath;
      try {
        if ( attributeDefinition.getType().isAssociationType() ) {
          visitAssociation( (AssociationAttributeDefinition) attributeDefinition );
        }
View Full Code Here

TOP

Related Classes of org.hibernate.loader.PropertyPath

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.