Examples of EntityReturn


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

      String[] keyColumnNames,
      LoadPlan loadPlan,
      SessionFactoryImplementor factory,
      QueryBuildingParameters buildingParameters,
      AliasResolutionContext aliasResolutionContext) {
    final EntityReturn rootReturn = Helper.INSTANCE.extractRootReturn( loadPlan, EntityReturn.class );

    final String[] keyColumnNamesToUse = keyColumnNames != null
        ? keyColumnNames
        : ( (Queryable) rootReturn.getEntityPersister() ).getIdentifierColumnNames();

    return generateSql(
        keyColumnNamesToUse,
        rootReturn,
        factory,
View Full Code Here

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

  }

  @Override
  protected EntityReturn buildRootEntityReturn(EntityDefinition entityDefinition) {
    final String entityName = entityDefinition.getEntityPersister().getEntityName();
    return new EntityReturn(
        sessionFactory(),
        LockMode.NONE, // todo : for now
        entityName
    );
  }
View Full Code Here

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

  }

  @Override
  protected EntityReturn buildRootEntityReturn(EntityDefinition entityDefinition) {
    final String entityName = entityDefinition.getEntityPersister().getEntityName();
    return new EntityReturn(
        sessionFactory(),
        LockMode.NONE, // todo : for now
        entityName
    );
  }
View Full Code Here

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

    if ( fetchOwnerStack.isEmpty() ) {
      // this is a root...
      if ( ! supportsRootEntityReturns() ) {
        throw new HibernateException( "This strategy does not support root entity returns" );
      }
      final EntityReturn entityReturn = buildRootEntityReturn( entityDefinition );
      addRootReturn( entityReturn );
      pushToStack( entityReturn );
    }
    // otherwise this call should represent a fetch which should have been handled in #startingAttribute
  }
View Full Code Here

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

    if ( fetchOwnerStack.isEmpty() ) {
      // this is a root...
      if ( ! supportsRootEntityReturns() ) {
        throw new HibernateException( "This strategy does not support root entity returns" );
      }
      final EntityReturn entityReturn = buildRootEntityReturn( entityDefinition );
      addRootReturn( entityReturn );
      pushToStack( entityReturn );
    }
    // otherwise this call should represent a fetch which should have been handled in #startingAttribute
  }
View Full Code Here

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

    if ( fetchOwnerStack.isEmpty() ) {
      // this is a root...
      if ( ! supportsRootEntityReturns() ) {
        throw new HibernateException( "This strategy does not support root entity returns" );
      }
      final EntityReturn entityReturn = buildRootEntityReturn( entityDefinition );
      addRootReturn( entityReturn );
      pushToStack( entityReturn );
    }
    // otherwise this call should represent a fetch which should have been handled in #startingAttribute
  }
View Full Code Here

Examples of org.hibernate.loader.plan2.spi.EntityReturn

    //   2) Determine how to read information out of the ResultSet resulting from executing the indicated SQL
    //    (the SQL aliases).  ReaderCollector and friends are where this work happens, ultimately
    //    producing a ResultSetProcessor

    final SelectStatementBuilder select = new SelectStatementBuilder( factory.getDialect() );
    final EntityReturn rootReturn = Helper.INSTANCE.extractRootReturn( loadPlan, EntityReturn.class );
    final ReaderCollectorImpl readerCollector = new ReaderCollectorImpl();

    final LoadQueryJoinAndFetchProcessor helper = new LoadQueryJoinAndFetchProcessor( aliasResolutionContext , buildingParameters, factory );

    final String[] keyColumnNamesToUse = keyColumnNames != null
        ? keyColumnNames
        : ( (Queryable) rootReturn.getEntityPersister() ).getIdentifierColumnNames();

    // LoadPlan is broken down into 2 high-level pieces that we need to process here.
    //
    // First is the QuerySpaces, which roughly equates to the SQL FROM-clause.  We'll cycle through
    // those first, generating aliases into the AliasContext in addition to writing SQL FROM-clause information
View Full Code Here

Examples of org.hibernate.loader.plan2.spi.EntityReturn

    if ( ScalarReturn.class.isInstance( rootReturn ) ) {
      printWriter.println( extractDetails( (ScalarReturn) rootReturn ) );
    }
    else if ( EntityReturn.class.isInstance( rootReturn ) ) {
      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;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.