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
ConstructorDescriptionCustomBatchLoaderFactory
(Map<String, Object> configurationValues, org.hibernate.service.spi.ServiceRegistryImplementor registry) -
Method Summary
Modifier and TypeMethodDescriptionorg.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) Methods inherited from class org.hibernate.loader.ast.internal.StandardBatchLoaderFactory
createEntityBatchLoader
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
createCollectionBatchLoader
in interfaceorg.hibernate.loader.ast.spi.BatchLoaderFactory
- Overrides:
createCollectionBatchLoader
in classorg.hibernate.loader.ast.internal.StandardBatchLoaderFactory
-