public class HibernateSessionFactory extends Object implements SessionFactory
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
This is a singleton, clone is not supported.
|
Session |
cloneSession(Session session)
Get a copy of the given session.
The session is not shared within the thread. |
void |
closeSession(Session s)
Close the given session.
|
static String |
getDatabaseConfigurationSuffix() |
static String |
getDatabasePropertiesSuffix() |
static String |
getDatabaseServerSuffix() |
Session |
getSession(String contextName,
String mappingName)
Get a session instance.
The session is shared within the thread. |
static SessionFactory |
getSessionfactory() |
Session |
getStatelessSession(String contextName,
String mappingName)
Get a stateless session instance.
The session is not shared within the thread. |
static void |
setDatabaseConfigurationSuffix(String databaseConfigurationSuffix)
Set the database configuration property suffix.
|
static void |
setDatabasePropertiesSuffix(String databasePropertiesSuffix)
Get the database properties property suffix.
|
static void |
setDatabaseServerSuffix(String databaseServerSuffix)
Get the database server property suffix.
|
Session |
switchSession(String contextName,
String mappingName,
Session newSession)
Switch the cached
Session for the given
contextName and mappingName with a new one. |
public Session getSession(String contextName, String mappingName) throws G9DataAccessException
SessionFactorygetSession in interface SessionFactorycontextName - (missing javadoc)mappingName - (missing javadoc)G9DataAccessException - (missing javadoc)SessionFactory.getSession(String, String)public Session getStatelessSession(String contextName, String mappingName) throws G9DataAccessException
SessionFactorygetStatelessSession in interface SessionFactorycontextName - (missing javadoc)mappingName - (missing javadoc)G9DataAccessException - (missing javadoc)SessionFactory.getStatelessSession(String, String)public Session cloneSession(Session session) throws IllegalArgumentException, G9DataAccessException
SessionFactorycloneSession in interface SessionFactorysession - (missing javadoc)IllegalArgumentException - (missing javadoc)G9DataAccessException - (missing javadoc)SessionFactory.cloneSession(no.g9.dataaccess.Session)public void closeSession(Session s) throws G9DataAccessException
SessionFactorycloseSession in interface SessionFactorys - (missing javadoc)G9DataAccessException - (missing javadoc)SessionFactory.closeSession(no.g9.dataaccess.Session)public Session switchSession(String contextName, String mappingName, Session newSession)
Session for the given
contextName and mappingName with a new one.
Intended for internal use only!contextName - the database context namemappingName - the database mapping namenewSession - the new Session to setSession (or null)public static SessionFactory getSessionfactory()
public Object clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionObject.clone()public static String getDatabaseConfigurationSuffix()
public static void setDatabaseConfigurationSuffix(String databaseConfigurationSuffix)
databaseConfigurationSuffix - (missing javadoc)public static String getDatabasePropertiesSuffix()
public static void setDatabasePropertiesSuffix(String databasePropertiesSuffix)
databasePropertiesSuffix - (missing javadoc)public static String getDatabaseServerSuffix()
public static void setDatabaseServerSuffix(String databaseServerSuffix)
databaseServerSuffix - (missing javadoc)Copyright © 2006–2017 Esito AS. All rights reserved.