Java Code Examples for org.hibernate.internal.util.collections.ArrayHelper#getBatchSizes()
The following examples show how to use
org.hibernate.internal.util.collections.ArrayHelper#getBatchSizes() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LegacyBatchingEntityLoaderBuilder.java From lams with GNU General Public License v2.0 | 6 votes |
protected LegacyBatchingEntityLoader( OuterJoinLoadable persister, int maxBatchSize, LockMode lockMode, 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 ) .withLockMode( lockMode ) .withLockOptions( lockOptions ); // we create a first entity loader to use it as a template for the others this.loaders[0] = entityLoaderBuilder.withBatchSize( batchSizes[0] ).byPrimaryKey(); for ( int i = 1; i < batchSizes.length; i++ ) { this.loaders[i] = entityLoaderBuilder.withEntityLoaderTemplate( this.loaders[0] ).withBatchSize( batchSizes[i] ).byPrimaryKey(); } }
Example 2
Source File: ReactivePaddedBatchingEntityLoader.java From hibernate-reactive with GNU Lesser General Public License v2.1 | 5 votes |
public ReactivePaddedBatchingEntityLoader( OuterJoinLoadable persister, int maxBatchSize, LockMode lockMode, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers) { super( persister ); this.batchSizes = ArrayHelper.getBatchSizes( maxBatchSize ); this.loaders = new ReactiveEntityLoader[ batchSizes.length ]; for ( int i = 0; i < batchSizes.length; i++ ) { this.loaders[i] = new ReactiveEntityLoader( persister, batchSizes[i], lockMode, factory, loadQueryInfluencers); } validate( maxBatchSize ); }
Example 3
Source File: ReactivePaddedBatchingEntityLoader.java From hibernate-reactive with GNU Lesser General Public License v2.1 | 5 votes |
public ReactivePaddedBatchingEntityLoader( OuterJoinLoadable persister, int maxBatchSize, LockOptions lockOptions, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers) { super( persister ); this.batchSizes = ArrayHelper.getBatchSizes( maxBatchSize ); this.loaders = new ReactiveEntityLoader[ batchSizes.length ]; for ( int i = 0; i < batchSizes.length; i++ ) { this.loaders[i] = new ReactiveEntityLoader( persister, batchSizes[i], lockOptions, factory, loadQueryInfluencers); } validate( maxBatchSize ); }
Example 4
Source File: ReactivePaddedBatchingCollectionInitializerBuilder.java From hibernate-reactive with GNU Lesser General Public License v2.1 | 5 votes |
@Override public ReactiveCollectionLoader createRealBatchingCollectionInitializer( QueryableCollection persister, int maxBatchSize, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers) throws MappingException { int[] batchSizes = ArrayHelper.getBatchSizes( maxBatchSize ); ReactiveCollectionLoader[] loaders = new ReactiveCollectionLoader[ batchSizes.length ]; for ( int i = 0; i < batchSizes.length; i++ ) { throw new UnsupportedOperationException(); // loaders[i] = new ReactiveBasicCollectionLoader( persister, batchSizes[i], factory, loadQueryInfluencers ); } return new ReactivePaddedBatchingCollectionInitializer( persister, batchSizes, loaders, factory, loadQueryInfluencers); }
Example 5
Source File: ReactivePaddedBatchingCollectionInitializerBuilder.java From hibernate-reactive with GNU Lesser General Public License v2.1 | 5 votes |
@Override public ReactiveCollectionLoader createRealBatchingOneToManyInitializer( QueryableCollection persister, int maxBatchSize, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers) throws MappingException { final int[] batchSizes = ArrayHelper.getBatchSizes( maxBatchSize ); final ReactiveCollectionLoader[] loaders = new ReactiveCollectionLoader[ batchSizes.length ]; for ( int i = 0; i < batchSizes.length; i++ ) { loaders[i] = new ReactiveOneToManyLoader( persister, batchSizes[i], factory, loadQueryInfluencers ); } return new ReactivePaddedBatchingCollectionInitializer( persister, batchSizes, loaders, factory, loadQueryInfluencers); }
Example 6
Source File: LegacyBatchingEntityLoaderBuilder.java From lams with GNU General Public License v2.0 | 5 votes |
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); } }
Example 7
Source File: LegacyBatchingEntityLoaderBuilder.java From lams with GNU General Public License v2.0 | 5 votes |
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); } }
Example 8
Source File: PaddedBatchingEntityLoaderBuilder.java From lams with GNU General Public License v2.0 | 5 votes |
public PaddedBatchingEntityLoader( 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); } validate( maxBatchSize ); }
Example 9
Source File: PaddedBatchingEntityLoaderBuilder.java From lams with GNU General Public License v2.0 | 5 votes |
public PaddedBatchingEntityLoader( 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); } validate( maxBatchSize ); }
Example 10
Source File: LegacyBatchingCollectionInitializerBuilder.java From lams with GNU General Public License v2.0 | 5 votes |
@Override protected CollectionInitializer createRealBatchingCollectionInitializer( QueryableCollection persister, int maxBatchSize, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers) throws MappingException { int[] batchSizes = ArrayHelper.getBatchSizes( maxBatchSize ); Loader[] loaders = new Loader[ batchSizes.length ]; for ( int i = 0; i < batchSizes.length; i++ ) { loaders[i] = new BasicCollectionLoader( persister, batchSizes[i], factory, loadQueryInfluencers ); } return new LegacyBatchingCollectionInitializer( persister, batchSizes, loaders ); }
Example 11
Source File: LegacyBatchingCollectionInitializerBuilder.java From lams with GNU General Public License v2.0 | 5 votes |
@Override protected CollectionInitializer createRealBatchingOneToManyInitializer( QueryableCollection persister, int maxBatchSize, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers) throws MappingException { final int[] batchSizes = ArrayHelper.getBatchSizes( maxBatchSize ); final Loader[] loaders = new Loader[ batchSizes.length ]; for ( int i = 0; i < batchSizes.length; i++ ) { loaders[i] = new OneToManyLoader( persister, batchSizes[i], factory, loadQueryInfluencers ); } return new LegacyBatchingCollectionInitializer( persister, batchSizes, loaders ); }
Example 12
Source File: PaddedBatchingCollectionInitializerBuilder.java From lams with GNU General Public License v2.0 | 5 votes |
@Override public CollectionInitializer createRealBatchingCollectionInitializer( QueryableCollection persister, int maxBatchSize, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers) throws MappingException { int[] batchSizes = ArrayHelper.getBatchSizes( maxBatchSize ); Loader[] loaders = new Loader[ batchSizes.length ]; for ( int i = 0; i < batchSizes.length; i++ ) { loaders[i] = new BasicCollectionLoader( persister, batchSizes[i], factory, loadQueryInfluencers ); } return new PaddedBatchingCollectionInitializer( persister, batchSizes, loaders ); }
Example 13
Source File: PaddedBatchingCollectionInitializerBuilder.java From lams with GNU General Public License v2.0 | 5 votes |
@Override public CollectionInitializer createRealBatchingOneToManyInitializer( QueryableCollection persister, int maxBatchSize, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers) throws MappingException { final int[] batchSizes = ArrayHelper.getBatchSizes( maxBatchSize ); final Loader[] loaders = new Loader[ batchSizes.length ]; for ( int i = 0; i < batchSizes.length; i++ ) { loaders[i] = new OneToManyLoader( persister, batchSizes[i], factory, loadQueryInfluencers ); } return new PaddedBatchingCollectionInitializer( persister, batchSizes, loaders ); }
Example 14
Source File: LegacyBatchingCollectionInitializerBuilder.java From lams with GNU General Public License v2.0 | 5 votes |
@Override public CollectionInitializer createRealBatchingCollectionInitializer( QueryableCollection persister, int maxBatchSize, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers) throws MappingException { int[] batchSizes = ArrayHelper.getBatchSizes( maxBatchSize ); Loader[] loaders = new Loader[ batchSizes.length ]; for ( int i = 0; i < batchSizes.length; i++ ) { loaders[i] = new BasicCollectionLoader( persister, batchSizes[i], factory, loadQueryInfluencers ); } return new LegacyBatchingCollectionInitializer( persister, batchSizes, loaders ); }
Example 15
Source File: LegacyBatchingCollectionInitializerBuilder.java From lams with GNU General Public License v2.0 | 5 votes |
@Override public CollectionInitializer createRealBatchingOneToManyInitializer( QueryableCollection persister, int maxBatchSize, SessionFactoryImplementor factory, LoadQueryInfluencers loadQueryInfluencers) throws MappingException { final int[] batchSizes = ArrayHelper.getBatchSizes( maxBatchSize ); final Loader[] loaders = new Loader[ batchSizes.length ]; for ( int i = 0; i < batchSizes.length; i++ ) { loaders[i] = new OneToManyLoader( persister, batchSizes[i], factory, loadQueryInfluencers ); } return new LegacyBatchingCollectionInitializer( persister, batchSizes, loaders ); }