HHH-5879 Expose SessionFactory observer as SessionFactoryImplementor contract

This commit is contained in:
Emmanuel Bernard 2010-07-05 17:59:14 +02:00
parent 300b1946fe
commit c6d0cef046
2 changed files with 11 additions and 0 deletions

View File

@ -36,6 +36,7 @@ import org.hibernate.Interceptor;
import org.hibernate.MappingException;
import org.hibernate.SessionFactory;
import org.hibernate.ConnectionReleaseMode;
import org.hibernate.SessionFactoryObserver;
import org.hibernate.proxy.EntityNotFoundDelegate;
import org.hibernate.engine.query.QueryPlanCache;
import org.hibernate.engine.profile.FetchProfile;
@ -244,4 +245,10 @@ public interface SessionFactoryImplementor extends Mapping, SessionFactory {
*/
public FetchProfile getFetchProfile(String name);
/**
* Return the SessionFactoryObserver attached to the SessionFactory if any
* @return
*/
public SessionFactoryObserver getFactoryObserver();
}

View File

@ -1275,6 +1275,10 @@ public final class SessionFactoryImpl implements SessionFactory, SessionFactoryI
return ( FetchProfile ) fetchProfiles.get( name );
}
public SessionFactoryObserver getFactoryObserver() {
return observer;
}
public TypeHelper getTypeHelper() {
return typeHelper;
}