Package org.hibernate.persister.walking.spi

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


    public AnyFetch buildAnyFetch(
        AttributeDefinition attribute,
        AnyMappingDefinition anyDefinition,
        FetchStrategy fetchStrategy,
        LoadPlanBuildingContext loadPlanBuildingContext) {
      throw new WalkingException( "Entity identifier cannot contain ANY type mappings" );
    }
View Full Code Here


      return ( (FetchOwner) entityReference ).retrieveFetchSourcePersister();
    }

    @Override
    public void injectIdentifierDescription(IdentifierDescription identifierDescription) {
      throw new WalkingException(
          "IdentifierDescription collector should not get injected with IdentifierDescription"
      );
    }
View Full Code Here

      }
      selectFragmentRangeStart += typeColSpan;
    }

    if ( subIndex < 0 ) {
      throw new WalkingException(
          String.format(
              "Owner property [%s] not found in composite properties [%s]",
              attributeDefinition.getName(),
              Arrays.asList( compositeType.getPropertyNames() )
          )
View Full Code Here

      FetchStrategy fetchStrategy) {
    super( sessionFactory, owner, fetchedAttribute, fetchStrategy );

    this.persister = sessionFactory.getEntityPersister( getFetchedType().getAssociatedEntityName() );
    if ( persister == null ) {
      throw new WalkingException(
          String.format(
              "Unable to locate EntityPersister [%s] for fetch [%s]",
              getFetchedType().getAssociatedEntityName(),
              fetchedAttribute.getName()
          )
View Full Code Here

      @Override
      public AnyMappingDefinition toAnyMappingDefinition() {
        final Type type = getType();
        if ( ! type.isAnyType() ) {
          throw new WalkingException( "Cannot treat collection element type as ManyToAny" );
        }
        return new StandardAnyTypeDefinition( (AnyType) type, isLazy() || isExtraLazy() );
      }

      @Override
      public EntityDefinition toEntityDefinition() {
        if ( getType().isComponentType() ) {
          throw new WalkingException( "Cannot treat composite collection element type as entity" );
        }
        return getElementPersister();
      }

      @Override
      public CompositeCollectionElementDefinition toCompositeElementDefinition() {

        if ( ! getType().isComponentType() ) {
          throw new WalkingException( "Cannot treat entity collection element type as composite" );
        }

        return new CompositeCollectionElementDefinition() {
          @Override
          public String getName() {
View Full Code Here

  public CollectionFetch buildCollectionFetch(
      AssociationAttributeDefinition attributeDefinition,
      FetchStrategy fetchStrategy,
      LoadPlanBuildingContext loadPlanBuildingContext) {
    if ( !allowCollectionFetches ) {
      throw new WalkingException(
          String.format(
              "This composite path [%s] does not allow collection fetches (composite id or composite collection index/element",
              getPropertyPath().getFullPath()
          )
      );
View Full Code Here

  }

  @Override
  public AnyMappingDefinition toAnyDefinition() {
    if ( !isAnyType() ) {
      throw new WalkingException( "Cannot build AnyMappingDefinition from non-any-typed attribute" );
    }
    // todo : not sure how lazy is propogated into the component for a subattribute of type any
    return new StandardAnyTypeDefinition( (AnyType) getType(), false );
  }
View Full Code Here

    final EntityPersister fetchedPersister = loadPlanBuildingContext.getSessionFactory().getEntityPersister(
        fetchedType.getAssociatedEntityName()
    );

    if ( fetchedPersister == null ) {
      throw new WalkingException(
          String.format(
              "Unable to locate EntityPersister [%s] for fetch [%s]",
              fetchedType.getAssociatedEntityName(),
              attributeDefinition.getName()
          )
View Full Code Here

    final EntityPersister fetchedPersister = loadPlanBuildingContext.getSessionFactory().getEntityPersister(
        fetchedType.getAssociatedEntityName()
    );

    if ( fetchedPersister == null ) {
      throw new WalkingException(
          String.format(
              "Unable to locate EntityPersister [%s] for bidirectional entity reference [%s]",
              fetchedType.getAssociatedEntityName(),
              attributeDefinition.getName()
          )
View Full Code Here

    final CollectionPersister fetchedPersister = loadPlanBuildingContext.getSessionFactory().getCollectionPersister(
        fetchedType.getRole()
    );

    if ( fetchedPersister == null ) {
      throw new WalkingException(
          String.format(
              "Unable to locate CollectionPersister [%s] for fetch [%s]",
              fetchedType.getRole(),
              attributeDefinition.getName()
          )
View Full Code Here

TOP

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

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.