Java 类org.hibernate.engine.spi.LoadQueryInfluencers 实例源码

项目:lams    文件:EntityJoinWalker.java   
public EntityJoinWalker(
        OuterJoinLoadable persister, 
        String[] uniqueKey, 
        int batchSize, 
        LockMode lockMode,
        final SessionFactoryImplementor factory,
        LoadQueryInfluencers loadQueryInfluencers) throws MappingException {
    super( persister, factory, loadQueryInfluencers );

    this.lockOptions.setLockMode(lockMode);

    StringBuilder whereCondition = whereString( getAlias(), uniqueKey, batchSize )
            //include the discriminator and class-level where, but not filters
            .append( persister.filterFragment( getAlias(), Collections.EMPTY_MAP ) );

    AssociationInitCallbackImpl callback = new AssociationInitCallbackImpl( factory );
    initAll( whereCondition.toString(), "", lockOptions, callback );
    this.compositeKeyManyToOneTargetIndices = callback.resolve();
}
项目:lams    文件:EntityJoinWalker.java   
public EntityJoinWalker(
        OuterJoinLoadable persister,
        String[] uniqueKey,
        int batchSize,
        LockOptions lockOptions,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers loadQueryInfluencers) throws MappingException {
    super( persister, factory, loadQueryInfluencers );
    LockOptions.copy(lockOptions, this.lockOptions);

    StringBuilder whereCondition = whereString( getAlias(), uniqueKey, batchSize )
            //include the discriminator and class-level where, but not filters
            .append( persister.filterFragment( getAlias(), Collections.EMPTY_MAP ) );

    AssociationInitCallbackImpl callback = new AssociationInitCallbackImpl( factory );
    initAll( whereCondition.toString(), "", lockOptions, callback );
    this.compositeKeyManyToOneTargetIndices = callback.resolve();
}
项目:lams    文件:CascadeEntityLoader.java   
public CascadeEntityLoader(
        OuterJoinLoadable persister,
        CascadingAction action,
        SessionFactoryImplementor factory) throws MappingException {
    super(
            persister,
            persister.getIdentifierType(),
            factory,
            LoadQueryInfluencers.NONE
    );

    JoinWalker walker = new CascadeEntityJoinWalker(
            persister,
            action,
            factory
    );
    initFromWalker( walker );

    postInstantiate();

    if ( LOG.isDebugEnabled() ) {
        LOG.debugf( "Static select for action %s on entity %s: %s", action, entityName, getSQLString() );
    }
}
项目:lams    文件:EntityLoader.java   
public EntityLoader(
        OuterJoinLoadable persister,
        int batchSize,
        LockMode lockMode,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers loadQueryInfluencers) throws MappingException {
    this(
            persister,
            persister.getIdentifierColumnNames(),
            persister.getIdentifierType(),
            batchSize,
            lockMode,
            factory,
            loadQueryInfluencers
        );
}
项目:lams    文件:EntityLoader.java   
public EntityLoader(
        OuterJoinLoadable persister,
        int batchSize,
        LockOptions lockOptions,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers loadQueryInfluencers) throws MappingException {
    this(
            persister,
            persister.getIdentifierColumnNames(),
            persister.getIdentifierType(),
            batchSize,
            lockOptions,
            factory,
            loadQueryInfluencers
        );
}
项目:lams    文件:LegacyBatchingEntityLoaderBuilder.java   
public LegacyBatchingEntityLoader(
        OuterJoinLoadable persister,
        int maxBatchSize,
        LockMode lockMode,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers loadQueryInfluencers) {
    super( persister );
    this.batchSizes = ArrayHelper.getBatchSizes( maxBatchSize );
    this.loaders = new EntityLoader[ batchSizes.length ];
    final EntityLoader.Builder entityLoaderBuilder = EntityLoader.forEntity( persister )
            .withInfluencers( loadQueryInfluencers )
            .withLockMode( lockMode );
    for ( int i = 0; i < batchSizes.length; i++ ) {
        this.loaders[i] = entityLoaderBuilder.withBatchSize( batchSizes[i] ).byPrimaryKey();
    }
}
项目:lams    文件:LegacyBatchingEntityLoaderBuilder.java   
public LegacyBatchingEntityLoader(
        OuterJoinLoadable persister,
        int maxBatchSize,
        LockOptions lockOptions,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers loadQueryInfluencers) {
    super( persister );
    this.batchSizes = ArrayHelper.getBatchSizes( maxBatchSize );
    this.loaders = new EntityLoader[ batchSizes.length ];
    final EntityLoader.Builder entityLoaderBuilder = EntityLoader.forEntity( persister )
            .withInfluencers( loadQueryInfluencers )
            .withLockOptions( lockOptions );
    for ( int i = 0; i < batchSizes.length; i++ ) {
        this.loaders[i] = entityLoaderBuilder.withBatchSize( batchSizes[i] ).byPrimaryKey();
    }
}
项目:lams    文件:BasicCollectionJoinWalker.java   
public BasicCollectionJoinWalker(
        QueryableCollection collectionPersister, 
        int batchSize, 
        String subquery, 
        SessionFactoryImplementor factory, 
        LoadQueryInfluencers loadQueryInfluencers) throws MappingException {

    super( factory, loadQueryInfluencers );

    this.collectionPersister = collectionPersister;

    String alias = generateRootAlias( collectionPersister.getRole() );

    walkCollectionTree(collectionPersister, alias);

    List allAssociations = new ArrayList();
    allAssociations.addAll(associations);
    allAssociations.add( OuterJoinableAssociation.createRoot( collectionPersister.getCollectionType(), alias, getFactory() ) );
    initPersisters(allAssociations, LockMode.NONE);
    initStatementString(alias, batchSize, subquery);
}
项目:lams    文件:SubselectOneToManyLoader.java   
public SubselectOneToManyLoader(
        QueryableCollection persister, 
        String subquery,
        Collection entityKeys,
        QueryParameters queryParameters,
        Map<String, int[]> namedParameterLocMap,
        SessionFactoryImplementor factory, 
        LoadQueryInfluencers loadQueryInfluencers) throws MappingException {
    super( persister, 1, subquery, factory, loadQueryInfluencers );

    keys = new Serializable[ entityKeys.size() ];
    Iterator iter = entityKeys.iterator();
    int i=0;
    while ( iter.hasNext() ) {
        keys[i++] = ( (EntityKey) iter.next() ).getIdentifier();
    }

    this.namedParameters = queryParameters.getNamedParameters();
    this.types = queryParameters.getFilteredPositionalParameterTypes();
    this.values = queryParameters.getFilteredPositionalParameterValues();
    this.namedParameterLocMap = namedParameterLocMap;
}
项目:lams    文件:OneToManyLoader.java   
public OneToManyLoader(
        QueryableCollection oneToManyPersister,
        int batchSize,
        String subquery,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers loadQueryInfluencers) throws MappingException {
    super( oneToManyPersister, factory, loadQueryInfluencers );

    JoinWalker walker = new OneToManyJoinWalker(
            oneToManyPersister,
            batchSize,
            subquery,
            factory,
            loadQueryInfluencers
    );
    initFromWalker( walker );

    postInstantiate();
    if ( LOG.isDebugEnabled() ) {
        LOG.debugf( "Static select for one-to-many %s: %s", oneToManyPersister.getRole(), getSQLString() );
    }
}
项目:lams    文件:DynamicBatchingCollectionInitializerBuilder.java   
public DynamicBatchingCollectionInitializer(
        QueryableCollection collectionPersister,
        int maxBatchSize,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers influencers) {
    super( collectionPersister );
    this.maxBatchSize = maxBatchSize;

    if ( collectionPersister.isOneToMany() ) {
        this.singleKeyLoader = new OneToManyLoader( collectionPersister, 1, factory, influencers );
    }
    else {
        this.singleKeyLoader = new BasicCollectionLoader( collectionPersister, 1, factory, influencers );
    }

    this.batchLoader = new DynamicBatchingCollectionLoader( collectionPersister, factory, influencers );
}
项目:lams    文件:DynamicBatchingCollectionInitializerBuilder.java   
public DynamicBatchingCollectionLoader(
        QueryableCollection collectionPersister,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers influencers) {
    super( collectionPersister, factory, influencers );

    JoinWalker walker = buildJoinWalker( collectionPersister, factory, influencers );
    initFromWalker( walker );
    this.sqlTemplate = walker.getSQLString();
    this.alias = StringHelper.generateAlias( collectionPersister.getRole(), 0 );
    postInstantiate();

    if ( LOG.isDebugEnabled() ) {
        LOG.debugf(
                "SQL-template for dynamic collection [%s] batch-fetching : %s",
                collectionPersister.getRole(),
                sqlTemplate
        );
    }
}
项目:lams    文件:SubselectCollectionLoader.java   
public SubselectCollectionLoader(
        QueryableCollection persister, 
        String subquery,
        Collection entityKeys,
        QueryParameters queryParameters,
        Map<String, int[]> namedParameterLocMap,
        SessionFactoryImplementor factory, 
        LoadQueryInfluencers loadQueryInfluencers) throws MappingException {
    super( persister, 1, subquery, factory, loadQueryInfluencers );

    keys = new Serializable[ entityKeys.size() ];
    Iterator iter = entityKeys.iterator();
    int i=0;
    while ( iter.hasNext() ) {
        keys[i++] = ( (EntityKey) iter.next() ).getIdentifier();
    }

    this.namedParameters = queryParameters.getNamedParameters();
    this.types = queryParameters.getFilteredPositionalParameterTypes();
    this.values = queryParameters.getFilteredPositionalParameterValues();
    this.namedParameterLocMap = namedParameterLocMap;

}
项目:lams    文件:OneToManyJoinWalker.java   
public OneToManyJoinWalker(
        QueryableCollection oneToManyPersister,
        int batchSize,
        String subquery,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers loadQueryInfluencers) throws MappingException {
    super( factory, loadQueryInfluencers );

    this.oneToManyPersister = oneToManyPersister;

    final OuterJoinLoadable elementPersister = (OuterJoinLoadable) oneToManyPersister.getElementPersister();
    final String alias = generateRootAlias( oneToManyPersister.getRole() );

    walkEntityTree(elementPersister, alias);

    List allAssociations = new ArrayList();
    allAssociations.addAll(associations);
    allAssociations.add( OuterJoinableAssociation.createRoot( oneToManyPersister.getCollectionType(), alias, getFactory() ) );
    initPersisters(allAssociations, LockMode.NONE);
    initStatementString(elementPersister, alias, batchSize, subquery);
}
项目:lams    文件:CollectionLoader.java   
public CollectionLoader byKey() {
    final QueryBuildingParameters buildingParameters = new QueryBuildingParameters() {
        @Override
        public LoadQueryInfluencers getQueryInfluencers() {
            return influencers;
        }

        @Override
        public int getBatchSize() {
            return batchSize;
        }

        @Override
        public LockMode getLockMode() {
            return LockMode.NONE;
        }

        @Override
        public LockOptions getLockOptions() {
            return null;
        }
    };
    return new CollectionLoader( collectionPersister, buildingParameters ) ;
}
项目:lams    文件:AbstractEntityPersister.java   
protected void createUniqueKeyLoaders() throws MappingException {
    Type[] propertyTypes = getPropertyTypes();
    String[] propertyNames = getPropertyNames();
    for ( int i = 0; i < entityMetamodel.getPropertySpan(); i++ ) {
        if ( propertyUniqueness[i] ) {
            //don't need filters for the static loaders
            uniqueKeyLoaders.put(
                    propertyNames[i],
                    createUniqueKeyLoader(
                            propertyTypes[i],
                            getPropertyColumnNames( i ),
                            LoadQueryInfluencers.NONE
                    )
            );
            //TODO: create uk loaders for component properties
        }
    }
}
项目:lams    文件:AbstractEntityPersister.java   
private EntityLoader createUniqueKeyLoader(
        Type uniqueKeyType,
        String[] columns,
        LoadQueryInfluencers loadQueryInfluencers) {
    if ( uniqueKeyType.isEntityType() ) {
        String className = ( ( EntityType ) uniqueKeyType ).getAssociatedEntityName();
        uniqueKeyType = getFactory().getEntityPersister( className ).getIdentifierType();
    }
    return new EntityLoader(
            this,
            columns,
            uniqueKeyType,
            1,
            LockMode.NONE,
            getFactory(),
            loadQueryInfluencers
    );
}
项目:lams    文件:EntityBasedAssociationAttribute.java   
@Override
public FetchStrategy determineFetchPlan(LoadQueryInfluencers loadQueryInfluencers, PropertyPath propertyPath) {
    final EntityPersister owningPersister = getSource().getEntityPersister();

    FetchStyle style = FetchStrategyHelper.determineFetchStyleByProfile(
            loadQueryInfluencers,
            owningPersister,
            propertyPath,
            attributeNumber()
    );
    if ( style == null ) {
        style = FetchStrategyHelper.determineFetchStyleByMetadata(
                ( (OuterJoinLoadable) getSource().getEntityPersister() ).getFetchMode( attributeNumber() ),
                getType(),
                sessionFactory()
        );
    }

    return new FetchStrategy(
            FetchStrategyHelper.determineFetchTiming( style, getType(), sessionFactory() ),
            style
    );
}
项目:lams    文件:CompositeBasedAssociationAttribute.java   
@Override
public FetchStrategy determineFetchPlan(LoadQueryInfluencers loadQueryInfluencers, PropertyPath propertyPath) {
    final EntityPersister owningPersister = getSource().locateOwningPersister();

    FetchStyle style = FetchStrategyHelper.determineFetchStyleByProfile(
            loadQueryInfluencers,
            owningPersister,
            propertyPath,
            attributeNumber()
    );
    if ( style == null ) {
        style = determineFetchStyleByMetadata( getFetchMode(), getType() );
    }

    return new FetchStrategy( determineFetchTiming( style ), style );
}
项目:lams    文件:AbstractEntityLoader.java   
public AbstractEntityLoader(
        OuterJoinLoadable persister,
        Type uniqueKeyType,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers loadQueryInfluencers) {
    super( factory, loadQueryInfluencers );
    this.uniqueKeyType = uniqueKeyType;
    this.entityName = persister.getEntityName();
    this.persister = persister;

}
项目:lams    文件:BatchingEntityLoaderBuilder.java   
/**
 * Builds a batch-fetch capable loader based on the given persister, lock-mode, etc.
 *
 * @param persister The entity persister
 * @param batchSize The maximum number of ids to batch-fetch at once
 * @param lockMode The lock mode
 * @param factory The SessionFactory
 * @param influencers Any influencers that should affect the built query
 *
 * @return The loader.
 */
public UniqueEntityLoader buildLoader(
        OuterJoinLoadable persister,
        int batchSize,
        LockMode lockMode,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers influencers) {
    if ( batchSize <= 1 ) {
        // no batching
        return buildNonBatchingLoader( persister, lockMode, factory, influencers );
    }
    return buildBatchingLoader( persister, batchSize, lockMode, factory, influencers );
}
项目:lams    文件:BatchingEntityLoaderBuilder.java   
protected UniqueEntityLoader buildNonBatchingLoader(
        OuterJoinLoadable persister,
        LockMode lockMode,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers influencers) {
    return new EntityLoader( persister, lockMode, factory, influencers );
}
项目:lams    文件:BatchingEntityLoaderBuilder.java   
/**
 * Builds a batch-fetch capable loader based on the given persister, lock-options, etc.
 *
 * @param persister The entity persister
 * @param batchSize The maximum number of ids to batch-fetch at once
 * @param lockOptions The lock options
 * @param factory The SessionFactory
 * @param influencers Any influencers that should affect the built query
 *
 * @return The loader.
 */
public UniqueEntityLoader buildLoader(
        OuterJoinLoadable persister,
        int batchSize,
        LockOptions lockOptions,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers influencers) {
    if ( batchSize <= 1 ) {
        // no batching
        return buildNonBatchingLoader( persister, lockOptions, factory, influencers );
    }
    return buildBatchingLoader( persister, batchSize, lockOptions, factory, influencers );
}
项目:lams    文件:BatchingEntityLoaderBuilder.java   
protected UniqueEntityLoader buildNonBatchingLoader(
        OuterJoinLoadable persister,
        LockOptions lockOptions,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers influencers) {
    return new EntityLoader( persister, lockOptions, factory, influencers );
}
项目:lams    文件:EntityLoader.java   
public EntityLoader(
        OuterJoinLoadable persister,
        LockMode lockMode,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers loadQueryInfluencers) throws MappingException {
    this( persister, 1, lockMode, factory, loadQueryInfluencers );
}
项目:lams    文件:EntityLoader.java   
public EntityLoader(
        OuterJoinLoadable persister,
        LockOptions lockOptions,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers loadQueryInfluencers) throws MappingException {
    this( persister, 1, lockOptions, factory, loadQueryInfluencers );
}
项目:lams    文件:EntityLoader.java   
public EntityLoader(
        OuterJoinLoadable persister,
        String[] uniqueKey,
        Type uniqueKeyType,
        int batchSize,
        LockMode lockMode,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers loadQueryInfluencers) throws MappingException {
    super( persister, uniqueKeyType, factory, loadQueryInfluencers );

    EntityJoinWalker walker = new EntityJoinWalker(
            persister,
            uniqueKey,
            batchSize,
            lockMode,
            factory,
            loadQueryInfluencers
    );
    initFromWalker( walker );
    this.compositeKeyManyToOneTargetIndices = walker.getCompositeKeyManyToOneTargetIndices();
    postInstantiate();

    batchLoader = batchSize > 1;

    if ( LOG.isDebugEnabled() ) {
        LOG.debugf( "Static select for entity %s [%s]: %s", entityName, lockMode, getSQLString() );
    }
}
项目:lams    文件:EntityLoader.java   
public EntityLoader(
        OuterJoinLoadable persister,
        String[] uniqueKey,
        Type uniqueKeyType,
        int batchSize,
        LockOptions lockOptions,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers loadQueryInfluencers) throws MappingException {
    super( persister, uniqueKeyType, factory, loadQueryInfluencers );

    EntityJoinWalker walker = new EntityJoinWalker(
            persister,
            uniqueKey,
            batchSize,
            lockOptions,
            factory,
            loadQueryInfluencers
    );
    initFromWalker( walker );
    this.compositeKeyManyToOneTargetIndices = walker.getCompositeKeyManyToOneTargetIndices();
    postInstantiate();

    batchLoader = batchSize > 1;

    if ( LOG.isDebugEnabled() ) {
        LOG.debugf( "Static select for entity %s [%s:%s]: %s",
                entityName,
                lockOptions.getLockMode(),
                lockOptions.getTimeOut(),
                getSQLString() );
    }
}
项目:lams    文件:DynamicBatchingEntityLoaderBuilder.java   
@Override
protected UniqueEntityLoader buildBatchingLoader(
        OuterJoinLoadable persister,
        int batchSize,
        LockMode lockMode,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers influencers) {
    return new DynamicBatchingEntityLoader( persister, batchSize, lockMode, factory, influencers );
}
项目:lams    文件:DynamicBatchingEntityLoaderBuilder.java   
@Override
protected UniqueEntityLoader buildBatchingLoader(
        OuterJoinLoadable persister,
        int batchSize,
        LockOptions lockOptions,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers influencers) {
    return new DynamicBatchingEntityLoader( persister, batchSize, lockOptions, factory, influencers );
}
项目:lams    文件:DynamicBatchingEntityLoaderBuilder.java   
public DynamicBatchingEntityLoader(
        OuterJoinLoadable persister,
        int maxBatchSize,
        LockMode lockMode,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers loadQueryInfluencers) {
    super( persister );
    this.maxBatchSize = maxBatchSize;
    this.singleKeyLoader = new EntityLoader( persister, 1, lockMode, factory, loadQueryInfluencers );
    this.dynamicLoader = new DynamicEntityLoader( persister, maxBatchSize, lockMode, factory, loadQueryInfluencers );
}
项目:lams    文件:DynamicBatchingEntityLoaderBuilder.java   
public DynamicBatchingEntityLoader(
        OuterJoinLoadable persister,
        int maxBatchSize,
        LockOptions lockOptions,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers loadQueryInfluencers) {
    super( persister );
    this.maxBatchSize = maxBatchSize;
    this.singleKeyLoader = new EntityLoader( persister, 1, lockOptions, factory, loadQueryInfluencers );
    this.dynamicLoader = new DynamicEntityLoader( persister, maxBatchSize, lockOptions, factory, loadQueryInfluencers );
}
项目:lams    文件:DynamicBatchingEntityLoaderBuilder.java   
public DynamicEntityLoader(
        OuterJoinLoadable persister,
        int maxBatchSize,
        LockOptions lockOptions,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers loadQueryInfluencers) {
    this( persister, maxBatchSize, lockOptions.getLockMode(), factory, loadQueryInfluencers );
}
项目:lams    文件:DynamicBatchingEntityLoaderBuilder.java   
public DynamicEntityLoader(
        OuterJoinLoadable persister,
        int maxBatchSize,
        LockMode lockMode,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers loadQueryInfluencers) {
    super( persister, -1, lockMode, factory, loadQueryInfluencers );

    EntityJoinWalker walker = new EntityJoinWalker(
            persister,
            persister.getIdentifierColumnNames(),
            -1,
            lockMode,
            factory,
            loadQueryInfluencers
    ) {
        @Override
        protected StringBuilder whereString(String alias, String[] columnNames, int batchSize) {
            return StringHelper.buildBatchFetchRestrictionFragment( alias, columnNames, getFactory().getDialect() );
        }
    };

    initFromWalker( walker );
    this.sqlTemplate = walker.getSQLString();
    this.alias = walker.getAlias();
    postInstantiate();

    if ( LOG.isDebugEnabled() ) {
        LOG.debugf(
                "SQL-template for dynamic entity [%s] batch-fetching [%s] : %s",
                entityName,
                lockMode,
                sqlTemplate
        );
    }
}
项目:lams    文件:LegacyBatchingEntityLoaderBuilder.java   
@Override
protected UniqueEntityLoader buildBatchingLoader(
        OuterJoinLoadable persister,
        int batchSize,
        LockMode lockMode,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers influencers) {
    return new LegacyBatchingEntityLoader( persister, batchSize, lockMode, factory, influencers );
}
项目:lams    文件:LegacyBatchingEntityLoaderBuilder.java   
@Override
protected UniqueEntityLoader buildBatchingLoader(
        OuterJoinLoadable persister,
        int batchSize,
        LockOptions lockOptions,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers influencers) {
    return new LegacyBatchingEntityLoader( persister, batchSize, lockOptions, factory, influencers );
}
项目:lams    文件:LegacyBatchingEntityLoaderBuilder.java   
public LegacyBatchingEntityLoader(
        OuterJoinLoadable persister,
        int maxBatchSize,
        LockMode lockMode,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers loadQueryInfluencers) {
    super( persister );
    this.batchSizes = ArrayHelper.getBatchSizes( maxBatchSize );
    this.loaders = new Loader[ batchSizes.length ];
    for ( int i = 0; i < batchSizes.length; i++ ) {
        this.loaders[i] = new EntityLoader( persister, batchSizes[i], lockMode, factory, loadQueryInfluencers);
    }
}
项目:lams    文件:LegacyBatchingEntityLoaderBuilder.java   
public LegacyBatchingEntityLoader(
        OuterJoinLoadable persister,
        int maxBatchSize,
        LockOptions lockOptions,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers loadQueryInfluencers) {
    super( persister );
    this.batchSizes = ArrayHelper.getBatchSizes( maxBatchSize );
    this.loaders = new Loader[ batchSizes.length ];
    for ( int i = 0; i < batchSizes.length; i++ ) {
        this.loaders[i] = new EntityLoader( persister, batchSizes[i], lockOptions, factory, loadQueryInfluencers);
    }
}
项目:lams    文件:CascadeEntityJoinWalker.java   
public CascadeEntityJoinWalker(OuterJoinLoadable persister, CascadingAction action, SessionFactoryImplementor factory)
throws MappingException {
    super( persister, factory, LoadQueryInfluencers.NONE );
    this.cascadeAction = action;
    StringBuilder whereCondition = whereString( getAlias(), persister.getIdentifierColumnNames(), 1 )
            //include the discriminator and class-level where, but not filters
            .append( persister.filterFragment( getAlias(), Collections.EMPTY_MAP ) );

    initAll( whereCondition.toString(), "", LockOptions.READ );
}
项目:lams    文件:PaddedBatchingEntityLoaderBuilder.java   
@Override
protected UniqueEntityLoader buildBatchingLoader(
        OuterJoinLoadable persister,
        int batchSize,
        LockMode lockMode,
        SessionFactoryImplementor factory,
        LoadQueryInfluencers influencers) {
    return new PaddedBatchingEntityLoader( persister, batchSize, lockMode, factory, influencers );
}