@Override public void initializeNonLazyCollections() throws HibernateException { if ( loadCounter == 0 ) { if ( TRACE_ENABLED ) { LOG.trace( "Initializing non-lazy collections" ); } //do this work only at the very highest level of the load //don't let this method be called recursively loadCounter++; try { int size; while ( ( size = nonlazyCollections.size() ) > 0 ) { //note that each iteration of the loop may add new elements nonlazyCollections.remove( size - 1 ).forceInitialization(); } } finally { loadCounter--; clearNullProperties(); } } }
/** * Force initialization of all non-lazy collections encountered during * the current two-phase load (actually, this is a no-op, unless this * is the "outermost" load) */ @Override public void initializeNonLazyCollections() throws HibernateException { if ( loadCounter == 0 ) { LOG.debug( "Initializing non-lazy collections" ); //do this work only at the very highest level of the load loadCounter++; //don't let this method be called recursively try { int size; while ( ( size = nonlazyCollections.size() ) > 0 ) { //note that each iteration of the loop may add new elements nonlazyCollections.remove( size - 1 ).forceInitialization(); } } finally { loadCounter--; clearNullProperties(); } } }
@Override public void initializeNonLazyCollections() throws HibernateException { if ( loadCounter == 0 ) { if ( TRACE_ENABLED ) { LOG.trace( "Initializing non-lazy collections" ); } //do this work only at the very highest level of the load //don't let this method be called recursively loadCounter++; try { int size; while ( ( size = nonlazyCollections.size() ) > 0 ) { //note that each iteration of the loop may add new elements nonlazyCollections.remove( size - 1 ).forceInitialization(); } } finally { loadCounter--; clearNullProperties(); } } }
/** * Force initialization of all non-lazy collections encountered during * the current two-phase load (actually, this is a no-op, unless this * is the "outermost" load) */ @Override public void initializeNonLazyCollections() throws HibernateException { if ( loadCounter == 0 ) { LOG.debug( "Initializing non-lazy collections" ); //do this work only at the very highest level of the load loadCounter++; //don't let this method be called recursively try { int size; while ( ( size = nonlazyCollections.size() ) > 0 ) { //note that each iteration of the loop may add new elements nonlazyCollections.remove( size - 1 ).forceInitialization(); } } finally { loadCounter--; clearNullProperties(); } } }