1010import org .hibernate .engine .spi .EntityKey ;
1111import org .hibernate .engine .spi .PersistenceContext ;
1212import org .hibernate .engine .spi .SharedSessionContractImplementor ;
13+ import org .hibernate .event .spi .EventSource ;
1314import org .hibernate .loader .ast .spi .MultiNaturalIdLoadOptions ;
1415import org .hibernate .loader .ast .spi .MultiNaturalIdLoader ;
1516import org .hibernate .metamodel .mapping .EntityMappingType ;
@@ -31,7 +32,7 @@ public AbstractMultiNaturalIdLoader(EntityMappingType entityDescriptor) {
3132 }
3233
3334 @ Override
34- public <K > List <E > multiLoad (K [] naturalIds , MultiNaturalIdLoadOptions options , SharedSessionContractImplementor session ) {
35+ public <K > List <E > multiLoad (K [] naturalIds , MultiNaturalIdLoadOptions options , EventSource eventSource ) {
3536 assert naturalIds != null ;
3637
3738 this .options = options ;
@@ -41,41 +42,41 @@ public <K> List<E> multiLoad(K[] naturalIds, MultiNaturalIdLoadOptions options,
4142 }
4243
4344 return options .isOrderReturnEnabled ()
44- ? performOrderedMultiLoad ( naturalIds , options , session )
45- : performUnorderedMultiLoad ( naturalIds , options , session );
45+ ? performOrderedMultiLoad ( naturalIds , options , eventSource )
46+ : performUnorderedMultiLoad ( naturalIds , options , eventSource );
4647 }
4748
48- private <K > List <E > performUnorderedMultiLoad (K [] naturalIds , MultiNaturalIdLoadOptions options , SharedSessionContractImplementor session ) {
49+ private <K > List <E > performUnorderedMultiLoad (K [] naturalIds , MultiNaturalIdLoadOptions options , EventSource eventSource ) {
4950 if ( MultiKeyLoadLogging .MULTI_KEY_LOAD_LOGGER .isTraceEnabled () ) {
5051 MultiKeyLoadLogging .MULTI_KEY_LOAD_LOGGER .tracef ( "Unordered MultiLoad Starting - `%s`" , getEntityDescriptor ().getEntityName () );
5152 }
5253
5354 return unorderedMultiLoad (
5455 naturalIds ,
55- session ,
56+ eventSource ,
5657 options .getLockOptions () == null ? LockOptions .NONE : options .getLockOptions ()
5758 );
5859 }
5960
60- protected abstract <K > List <E > unorderedMultiLoad (K [] naturalIds , SharedSessionContractImplementor session , LockOptions lockOptions );
61+ protected abstract <K > List <E > unorderedMultiLoad (K [] naturalIds , EventSource eventSource , LockOptions lockOptions );
6162
62- private <K > List <E > performOrderedMultiLoad (K [] naturalIds , MultiNaturalIdLoadOptions options , SharedSessionContractImplementor session ) {
63+ private <K > List <E > performOrderedMultiLoad (K [] naturalIds , MultiNaturalIdLoadOptions options , EventSource eventSource ) {
6364 if ( MultiKeyLoadLogging .MULTI_KEY_LOAD_LOGGER .isTraceEnabled () ) {
6465 MultiKeyLoadLogging .MULTI_KEY_LOAD_LOGGER .tracef ( "Ordered MultiLoad Starting - `%s`" , getEntityDescriptor ().getEntityName () );
6566 }
6667
6768 return orderedMultiLoad (
6869 naturalIds ,
69- session ,
70+ eventSource ,
7071 options .getLockOptions () == null ? LockOptions .NONE : options .getLockOptions ()
7172 );
7273 }
7374
74- protected <K > List <E > orderedMultiLoad ( K [] naturalIds , SharedSessionContractImplementor session , LockOptions lockOptions ) {
75+ protected <K > List <E > orderedMultiLoad ( K [] naturalIds , EventSource eventSource , LockOptions lockOptions ) {
7576
76- unorderedMultiLoad ( naturalIds , session , lockOptions );
77+ unorderedMultiLoad ( naturalIds , eventSource , lockOptions );
7778
78- return handleResults ( naturalIds , session , lockOptions );
79+ return handleResults ( naturalIds , eventSource , lockOptions );
7980 }
8081
8182 protected <K > List <E > handleResults ( K [] naturalIds , SharedSessionContractImplementor session , LockOptions lockOptions ) {
0 commit comments