Class CustomBatchLoaderFactory
java.lang.Object
org.hibernate.loader.ast.internal.StandardBatchLoaderFactory
ch.tocco.nice2.persist.core.impl.hibernate.persister.CustomBatchLoaderFactory
- All Implemented Interfaces:
Serializable, org.hibernate.loader.ast.spi.BatchLoaderFactory, org.hibernate.service.Service
public class CustomBatchLoaderFactory
extends org.hibernate.loader.ast.internal.StandardBatchLoaderFactory
Wrap
StandardBatchLoaderFactory to lazy load LazyCollectionLoader. The CollectionLoader
are used in AbstractCollectionPersister (superclass of ExtendedBasicCollectionPersister and ExtendedOneToManyPersister).
Overriding createCollectionLoader is no longer possible, so do it here. As we have a custom collection initialization mechanism
(ExtendedInitializeCollectionEventListener), the initializers of the superclass are probably never used.
Therefore we don't initialize them until necessary, as they take up a lot of memory.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCustomBatchLoaderFactory(Map<String, Object> configurationValues, org.hibernate.service.spi.ServiceRegistryImplementor registry) -
Method Summary
Modifier and TypeMethodDescriptionorg.hibernate.loader.ast.spi.CollectionBatchLoadercreateCollectionBatchLoader(int domainBatchSize, org.hibernate.engine.spi.LoadQueryInfluencers influencers, org.hibernate.metamodel.mapping.PluralAttributeMapping attributeMapping, org.hibernate.engine.spi.SessionFactoryImplementor factory) Methods inherited from class org.hibernate.loader.ast.internal.StandardBatchLoaderFactory
createEntityBatchLoaderMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.loader.ast.spi.BatchLoaderFactory
createEntityBatchLoader
-
Constructor Details
-
CustomBatchLoaderFactory
-
-
Method Details
-
createCollectionBatchLoader
public org.hibernate.loader.ast.spi.CollectionBatchLoader createCollectionBatchLoader(int domainBatchSize, org.hibernate.engine.spi.LoadQueryInfluencers influencers, org.hibernate.metamodel.mapping.PluralAttributeMapping attributeMapping, org.hibernate.engine.spi.SessionFactoryImplementor factory) - Specified by:
createCollectionBatchLoaderin interfaceorg.hibernate.loader.ast.spi.BatchLoaderFactory- Overrides:
createCollectionBatchLoaderin classorg.hibernate.loader.ast.internal.StandardBatchLoaderFactory
-