@Override public Object internalLoad( String entityName, Serializable id, boolean eager, boolean nullable) throws HibernateException { checkOpen(); EntityPersister persister = getFactory().getMetamodel().entityPersister( entityName ); // first, try to load it from the temp PC associated to this SS Object loaded = temporaryPersistenceContext.getEntity( generateEntityKey( id, persister ) ); if ( loaded != null ) { // we found it in the temp PC. Should indicate we are in the midst of processing a result set // containing eager fetches via join fetch return loaded; } if ( !eager && persister.hasProxy() ) { // if the metadata allowed proxy creation and caller did not request forceful eager loading, // generate a proxy return persister.createProxy( id, this ); } // otherwise immediately materialize it return get( entityName, id ); }
@Override public Object internalLoad( String entityName, Serializable id, boolean eager, boolean nullable) throws HibernateException { errorIfClosed(); EntityPersister persister = getFactory().getEntityPersister( entityName ); // first, try to load it from the temp PC associated to this SS Object loaded = temporaryPersistenceContext.getEntity( generateEntityKey( id, persister ) ); if ( loaded != null ) { // we found it in the temp PC. Should indicate we are in the midst of processing a result set // containing eager fetches via join fetch return loaded; } if ( !eager && persister.hasProxy() ) { // if the metadata allowed proxy creation and caller did not request forceful eager loading, // generate a proxy return persister.createProxy( id, this ); } // otherwise immediately materialize it return get( entityName, id ); }
@Override public Object internalLoad( String entityName, Serializable id, boolean eager, boolean nullable) throws HibernateException { errorIfClosed(); EntityPersister persister = getFactory().getEntityPersister( entityName ); // first, try to load it from the temp PC associated to this SS Object loaded = temporaryPersistenceContext.getEntity( generateEntityKey( id, persister ) ); if ( loaded != null ) { // we found it in the temp PC. Should indicate we are in the midst of processing a result set // containing eager fetches via join fetch return loaded; } if ( !eager && persister.hasProxy() ) { // if the metadata allowed proxy creation and caller did not request forceful eager loading, // generate a proxy return persister.createProxy( id, this ); } // otherwise immediately materialize it return get( entityName, id ); }
@Override public Object internalLoad( String entityName, Object id, boolean eager, boolean nullable) throws HibernateException { checkOpen(); EntityTypeDescriptor descriptor = getFactory().getMetamodel().findEntityDescriptor( entityName ); // first, try to load it from the temp PC associated to this SS Object loaded = temporaryPersistenceContext.getEntity( generateEntityKey( id, descriptor ) ); if ( loaded != null ) { // we found it in the temp PC. Should indicate we are in the midst of processing a result set // containing eager fetches via join fetch return loaded; } if ( !eager && descriptor.hasProxy() ) { // if the metadata allowed proxy creation and caller did not request forceful eager loading, // generate a proxy return descriptor.createProxy( id, this ); } // otherwise immediately materialize it return get( entityName, id ); }