Package org.hibernate.loader.plan.spi

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


  public static EntityFetch buildStandardEntityFetch(
      FetchOwner fetchOwner,
      AssociationAttributeDefinition attributeDefinition,
      FetchStrategy fetchStrategy,
      LoadPlanBuildingContext loadPlanBuildingContext) {
    return new EntityFetch(
        loadPlanBuildingContext.getSessionFactory(),
        LockMode.NONE, // todo : for now
        fetchOwner,
        attributeDefinition,
        fetchStrategy
View Full Code Here


      FetchOwner fetchOwner,
      AssociationAttributeDefinition attributeDefinition,
      FetchStrategy fetchStrategy,
      LoadPlanBuildingContext loadPlanBuildingContext) {

    return new EntityFetch(
        loadPlanBuildingContext.getSessionFactory(),
        LockMode.NONE, // todo : for now
        fetchOwner,
        attributeDefinition.getName(),
        fetchStrategy
View Full Code Here

        LoadPlanBuildingContext loadPlanBuildingContext) {
      // we have a key-many-to-one
      //
      // IMPL NOTE: we pass ourselves as the FetchOwner which will route the fetch back throw our #addFetch
      //     impl.  We collect them there and later build the IdentifierDescription
      final EntityFetch fetch = LoadPlanBuildingHelper.buildStandardEntityFetch(
          this,
          attributeDefinition,
          fetchStrategy,
          loadPlanBuildingContext
      );
View Full Code Here

  private static void resolveIdentifierFetch(
      ResultSet resultSet,
      ResultSetProcessingContext context,
      Fetch fetch) throws SQLException {
    if ( fetch instanceof EntityFetch ) {
      EntityFetch entityFetch = (EntityFetch) fetch;
      final IdentifierResolutionContext identifierResolutionContext =
          context.getIdentifierResolutionContext( entityFetch );
      if ( identifierResolutionContext.getEntityKey() != null ) {
        return;
      }

      EntityKey fetchKey = entityFetch.resolveInIdentifier( resultSet, context );
      identifierResolutionContext.registerEntityKey( fetchKey );
    }
    else if ( fetch instanceof CompositeFetch ) {
      for ( Fetch subFetch : ( (CompositeFetch) fetch ).getFetches() ) {
        resolveIdentifierFetch( resultSet, context, subFetch );
View Full Code Here

          fetchStrategy
      );
      return false;
    }
    else if ( nature == AssociationAttributeDefinition.AssociationNature.ENTITY ) {
      EntityFetch fetch = currentSource.buildEntityAttributeFetch(
          attributeDefinition,
          fetchStrategy
      );
      if ( fetchStrategy.getStyle() == FetchStyle.JOIN ) {
        pushToStack( (ExpandingFetchSource) fetch );
View Full Code Here

          fetchStrategy
      );
      return false;
    }
    else if ( nature == AssociationAttributeDefinition.AssociationNature.ENTITY ) {
      EntityFetch fetch = currentSource.buildEntityAttributeFetch(
          attributeDefinition,
          fetchStrategy
      );
      if ( fetchStrategy.getStyle() == FetchStyle.JOIN ) {
        pushToStack( (ExpandingFetchSource) fetch );
View Full Code Here

      FetchOwner fetchOwner,
      AssociationAttributeDefinition attributeDefinition,
      FetchStrategy fetchStrategy,
      LoadPlanBuildingContext loadPlanBuildingContext) {

    return new EntityFetch(
        loadPlanBuildingContext.getSessionFactory(),
        LockMode.NONE, // todo : for now
        fetchOwner,
        attributeDefinition.getName(),
        fetchStrategy
View Full Code Here

        LoadPlanBuildingContext loadPlanBuildingContext) {
      // we have a key-many-to-one
      //
      // IMPL NOTE: we pass ourselves as the FetchOwner which will route the fetch back through our #addFetch
      //     impl.  We collect them there and later build the IdentifierDescription
      final EntityFetch fetch = super.buildEntityFetch( attributeDefinition, fetchStrategy, loadPlanBuildingContext );
      fetchToHydratedStateExtractorMap.put( fetch, attributeDefinition.getHydratedCompoundValueExtractor() );

      return fetch;
    }
View Full Code Here

  private static void resolveIdentifierFetch(
      ResultSet resultSet,
      ResultSetProcessingContext context,
      Fetch fetch) throws SQLException {
    if ( fetch instanceof EntityFetch ) {
      EntityFetch entityFetch = (EntityFetch) fetch;
      final IdentifierResolutionContext identifierResolutionContext =
          context.getIdentifierResolutionContext( entityFetch );
      if ( identifierResolutionContext.getEntityKey() != null ) {
        return;
      }

      EntityKey fetchKey = entityFetch.resolveInIdentifier( resultSet, context );
      identifierResolutionContext.registerEntityKey( fetchKey );
    }
    else if ( fetch instanceof CompositeFetch ) {
      for ( Fetch subFetch : ( (CompositeFetch) fetch ).getFetches() ) {
        resolveIdentifierFetch( resultSet, context, subFetch );
View Full Code Here

TOP

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

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.