@Override public void finishUp(ResultSetProcessingContextImpl context, List<AfterLoadAction> afterLoadActionList) { final List<HydratedEntityRegistration> hydratedEntityRegistrations = context.getHydratedEntityRegistrationList(); // for arrays, we should end the collection load before resolving the entities, since the // actual array instances are not instantiated during loading finishLoadingArrays( context ); // IMPORTANT: reuse the same event instances for performance! final PreLoadEvent preLoadEvent; final PostLoadEvent postLoadEvent; if ( context.getSession().isEventSource() ) { preLoadEvent = new PreLoadEvent( (EventSource) context.getSession() ); postLoadEvent = new PostLoadEvent( (EventSource) context.getSession() ); } else { preLoadEvent = null; postLoadEvent = null; } // now finish loading the entities (2-phase load) performTwoPhaseLoad( preLoadEvent, context, hydratedEntityRegistrations ); // now we can finalize loading collections finishLoadingCollections( context ); // and trigger the afterInitialize() hooks afterInitialize( context, hydratedEntityRegistrations ); // finally, perform post-load operations postLoad( postLoadEvent, context, hydratedEntityRegistrations, afterLoadActionList ); }
final PreLoadEvent preLoadEvent = new PreLoadEvent( session ) .setEntity( instance ) .setState( state )
final PostLoadEvent post; if ( session.isEventSource() ) { pre = new PreLoadEvent( (EventSource) session ); post = new PostLoadEvent( (EventSource) session );
false, session, new PreLoadEvent( (EventSource) session ) ); TwoPhaseLoad.afterInitialize( clone, session );
public JdbcValuesSourceProcessingStateStandardImpl( ExecutionContext executionContext, JdbcValuesSourceProcessingOptions processingOptions) { this.executionContext = executionContext; this.processingOptions = processingOptions; preLoadEvent = new PreLoadEvent( (EventSource) executionContext.getSession() ); postLoadEvent = new PostLoadEvent( (EventSource) executionContext.getSession() ); fetchContext = resolveFetchContext( executionContext.getQueryOptions().getAppliedGraph() ); }
final PostLoadEvent post; if ( session.isEventSource() ) { pre = new PreLoadEvent( (EventSource) session ); post = new PostLoadEvent( (EventSource) session );
final PostLoadEvent post; if ( session.isEventSource() ) { pre = new PreLoadEvent( (EventSource) session ); post = new PostLoadEvent( (EventSource) session );
final PostLoadEvent post; if ( session.isEventSource() ) { pre = new PreLoadEvent( (EventSource) session ); post = new PostLoadEvent( (EventSource) session );
final PreLoadEvent preLoadEvent = new PreLoadEvent( session ) .setEntity( instance ) .setState( state )
final PreLoadEvent preLoadEvent = new PreLoadEvent( session ) .setEntity( result ) .setState( assembledProps )
final PreLoadEvent preLoadEvent = new PreLoadEvent( session ) .setEntity( result ) .setState( assembledProps )