프로퍼티 | 타입 | 설명 | |
---|---|---|---|
SESSION_SYNCHRONIZATION_ORDER | int |
메소드 | 설명 | |
---|---|---|
ApplyTransactionTimeout ( ICriteria criteria, ISessionFactory sessionFactory ) : void |
Applies the current transaction timeout, if any, to the given criteria object
|
|
ApplyTransactionTimeout ( IQuery query, ISessionFactory sessionFactory ) : void |
Applies the current transaction timeout, if any, to the given Hibenrate query object.
|
|
CloseSession ( ISession session ) : void |
Perform the actual closing of the Hibernate Session catching and logging any cleanup exceptions thrown.
|
|
ConvertAdoAccessException ( IAdoExceptionTranslator translator, |
Converts a Hibernate ADOException to a Spring DataAccessExcption, extracting the underlying error code from ADO.NET. Will extract the ADOException Message and SqlString properties and pass them to the translate method of the provided IAdoExceptionTranslator.
|
|
ConvertHibernateAccessException ( NHibernate.HibernateException ex ) : Spring.Dao.DataAccessException |
Convert the given HibernateException to an appropriate exception from the
|
|
DoGetSession ( ISessionFactory sessionFactory, bool allowCreate ) : ISession |
Get a Hibernate Session for the given SessionFactory. Is aware of and will return any existing corresponding Session bound to the current thread, for example whenusing HibernateTransactionManager. Will create a new Session otherwise, if "allowCreate" is true. Throws the orginal HibernateException, in contrast to GetSession(ISessionFactory, bool). |
|
GetDbProvider ( ISessionFactory sessionFactory ) : IDbProvider |
Gets the Spring IDbProvider given the ISessionFactory. The matching is performed by comparing the assembly qualified name string of the hibernate Driver.ConnectionType to those in the DbProviderFactory definitions. No connections are created in performing this comparison. |
|
GetNewSession ( ISessionFactory sessionFactory, IInterceptor interceptor ) : ISession |
Get a new Hibernate Session from the given SessionFactory. Will return a new Session even if there already is a pre-bound Session for the given SessionFactory. Within a transaction, this method will create a new Session that shares the transaction's ADO.NET Connection. More specifically, it will use the same ADO.NET Connection as the pre-bound Hibernate Session. |
|
GetSession ( ISessionFactory sessionFactory, IInterceptor entityInterceptor, IAdoExceptionTranslator adoExceptionTranslator ) : ISession |
Get a Hibernate Session for the given SessionFactory. Is aware of and will return any existing corresponding Session bound to the current thread, for example when using HibernateTransactionManager. Will always create a new Session otherwise. Supports setting a Session-level Hibernate entity interceptor that allows to inspect and change property values before writing to and reading from the database. Such an interceptor can also be set at the SessionFactory level (i.e. on LocalSessionFactoryObject), on HibernateTransactionManager, or on HibernateInterceptor/HibernateTemplate. |
|
GetSession ( ISessionFactory sessionFactory, bool allowCreate ) : ISession |
Get a Hibernate Session for the given SessionFactory. Is aware of and will return any existing corresponding Session bound to the current thread, for example when using HibernateTransactionManager. Will create a new Session otherwise, if allowCreate is true.
|
|
InitDeferredClose ( ISessionFactory sessionFactory ) : void |
Initialize deferred close for the current thread and the given SessionFactory. Sessions will not be actually closed on close calls then, but rather at a processDeferredClose call at a finishing point (like request completion).
|
|
IsDeferredCloseActive ( ISessionFactory sessionFactory ) : bool |
Return if deferred close is active for the current thread and the given SessionFactory.
|
|
IsSessionTransactional ( ISession session, ISessionFactory sessionFactory ) : bool |
Return whether the given Hibernate Session is transactional, that is, bound to the current thread by Spring's transaction facilities.
|
|
NewAdoExceptionTranslator ( ISessionFactory sessionFactory ) : IAdoExceptionTranslator |
Create a IAdoExceptionTranslator from the given SessionFactory. If a corresponding IDbProvider is found, a ErrorcodeExceptionTranslator for the IDbProvider is created. Otherwise, a FallbackException is created. |
|
ProcessDeferredClose ( ISessionFactory sessionFactory ) : void |
Process Sessions that have been registered for deferred close for the given SessionFactory.
|
|
ReleaseSession ( ISession session, ISessionFactory sessionFactory ) : void |
Close the given Session, created via the given factory, if it is not managed externally (i.e. not bound to the thread).
|
|
SessionFactoryUtils ( ) : System |
Initializes a new instance of the SessionFactoryUtils class.
|
메소드 | 설명 | |
---|---|---|
CloseSessionOrRegisterDeferredClose ( ISession session, ISessionFactory sessionFactory ) : void |
Close the given Session or register it for deferred close.
|
|
DoGetSession ( ISessionFactory sessionFactory, IInterceptor entityInterceptor, IAdoExceptionTranslator adoExceptionTranslator, bool allowCreate ) : ISession | ||
GetSession ( ISessionFactory sessionFactory, IInterceptor entityInterceptor, IAdoExceptionTranslator adoExceptionTranslator, bool allowCreate ) : ISession | ||
OpenSession ( ISessionFactory sessionFactory, IInterceptor entityInterceptor ) : ISession |
Open a new Session from the factory.
|
public static ApplyTransactionTimeout ( ICriteria criteria, ISessionFactory sessionFactory ) : void | ||
criteria | ICriteria | The Hibernate Criteria object. |
sessionFactory | ISessionFactory | Hibernate SessionFactory that the Criteria was created for
/// (can be null ). |
리턴 | void |
public static ApplyTransactionTimeout ( IQuery query, ISessionFactory sessionFactory ) : void | ||
query | IQuery | The Hibernate Query object. |
sessionFactory | ISessionFactory | Hibernate SessionFactory that the Query was created for
/// (can be null ). |
리턴 | void |
public static CloseSession ( ISession session ) : void | ||
session | ISession | The hibernate session to close |
리턴 | void |
public static ConvertAdoAccessException ( IAdoExceptionTranslator translator, |
||
translator | IAdoExceptionTranslator | The IAdoExceptionTranslator, may be a user provided implementation as configured on /// HibernateTemplate. /// |
ex | The ADOException throw | |
리턴 | Spring.Dao.DataAccessException |
public static ConvertHibernateAccessException ( NHibernate.HibernateException ex ) : Spring.Dao.DataAccessException | ||
ex | NHibernate.HibernateException | The Hibernate exception that occured. |
리턴 | Spring.Dao.DataAccessException |
public static DoGetSession ( ISessionFactory sessionFactory, bool allowCreate ) : ISession | ||
sessionFactory | ISessionFactory | The session factory. |
allowCreate | bool | if set to |
리턴 | ISession |
public static GetDbProvider ( ISessionFactory sessionFactory ) : IDbProvider | ||
sessionFactory | ISessionFactory | The session factory. |
리턴 | IDbProvider |
public static GetNewSession ( ISessionFactory sessionFactory, IInterceptor interceptor ) : ISession | ||
sessionFactory | ISessionFactory | The session factory to create the session with. |
interceptor | IInterceptor | The Hibernate entity interceptor, or null if none. |
리턴 | ISession |
public static GetSession ( ISessionFactory sessionFactory, IInterceptor entityInterceptor, IAdoExceptionTranslator adoExceptionTranslator ) : ISession | ||
sessionFactory | ISessionFactory | The session factory to create the /// session with. |
entityInterceptor | IInterceptor | Hibernate entity interceptor, or null if none. |
adoExceptionTranslator | IAdoExceptionTranslator | AdoExceptionTranslator to use for flushing the
/// Session on transaction synchronization (can be null ; only used when actually
/// registering a transaction synchronization). |
리턴 | ISession |
public static GetSession ( ISessionFactory sessionFactory, bool allowCreate ) : ISession | ||
sessionFactory | ISessionFactory | The session factory to create the session with. |
allowCreate | bool | if set to |
리턴 | ISession |
public static InitDeferredClose ( ISessionFactory sessionFactory ) : void | ||
sessionFactory | ISessionFactory | The session factory. |
리턴 | void |
public static IsDeferredCloseActive ( ISessionFactory sessionFactory ) : bool | ||
sessionFactory | ISessionFactory | The session factory. |
리턴 | bool |
public static IsSessionTransactional ( ISession session, ISessionFactory sessionFactory ) : bool | ||
session | ISession | The hibernate session to check |
sessionFactory | ISessionFactory | The session factory that the session /// was created with, can be null. |
리턴 | bool |
public static NewAdoExceptionTranslator ( ISessionFactory sessionFactory ) : IAdoExceptionTranslator | ||
sessionFactory | ISessionFactory | The session factory to create the translator for |
리턴 | IAdoExceptionTranslator |
public static ProcessDeferredClose ( ISessionFactory sessionFactory ) : void | ||
sessionFactory | ISessionFactory | The session factory. |
리턴 | void |
public static ReleaseSession ( ISession session, ISessionFactory sessionFactory ) : void | ||
session | ISession | The hibernate session to close |
sessionFactory | ISessionFactory | The hibernate SessionFactory that /// the session was created with. |
리턴 | void |