public static IUniqueEntityLoader CreateBatchingEntityLoader(IOuterJoinLoadable persister, int maxBatchSize, LockMode lockMode, ISessionFactoryImplementor factory, IDictionary <string, IFilter> enabledFilters) { if (maxBatchSize > 1) { int[] batchSizesToCreate = ArrayHelper.GetBatchSizes(maxBatchSize); Loader[] loadersToCreate = new Loader[batchSizesToCreate.Length]; for (int i = 0; i < batchSizesToCreate.Length; i++) { loadersToCreate[i] = new EntityLoader(persister, batchSizesToCreate[i], lockMode, factory, enabledFilters); } return(new BatchingEntityLoader(persister, batchSizesToCreate, loadersToCreate)); } else { return(new EntityLoader(persister, lockMode, factory, enabledFilters)); } }
public static IUniqueEntityLoader CreateBatchingEntityLoader(IOuterJoinLoadable persister, int maxBatchSize, LockMode lockMode, ISessionFactoryImplementor factory, IDictionary<string, IFilter> enabledFilters) { if (maxBatchSize > 1) { int[] batchSizesToCreate = ArrayHelper.GetBatchSizes(maxBatchSize); Loader[] loadersToCreate = new Loader[batchSizesToCreate.Length]; for (int i = 0; i < batchSizesToCreate.Length; i++) { loadersToCreate[i] = new EntityLoader(persister, batchSizesToCreate[i], lockMode, factory, enabledFilters); } return new BatchingEntityLoader(persister, batchSizesToCreate, loadersToCreate); } else { return new EntityLoader(persister, lockMode, factory, enabledFilters); } }