|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.server.persistence.BasicPersistenceContextProvider
org.openbp.server.persistence.hibernate.HibernatePersistenceContextProvider
public class HibernatePersistenceContextProvider
Peristence context provider for a Hibernate-based persistence context.
| Field Summary | |
|---|---|
protected org.hibernate.SessionFactory |
sessionFactory
Session factory |
| Fields inherited from class org.openbp.server.persistence.BasicPersistenceContextProvider |
|---|
applicationContext, entityToBeanClassMap, threadContext |
| Constructor Summary | |
|---|---|
HibernatePersistenceContextProvider()
Constructor. |
|
| Method Summary | |
|---|---|
static void |
addOpenBPClassMappingsToConfiguration(org.hibernate.cfg.Configuration configuration)
Adds class mappings for the OpenBP classes to the given Hibernate configuration object. |
org.hibernate.cfg.Configuration |
createHibernateConfiguration()
Creates a Hibernate configuration object that includes the OpenBP classes. |
protected PersistenceContext |
createPersistenceContext()
Creates a new persistence context. |
protected org.hibernate.SessionFactory |
createSessionFactory()
Creates a Hibernate session factory. |
void |
setSessionFactory(org.hibernate.SessionFactory sessionFactory)
Sets the session factory. |
void |
shutdown()
The shutdown method . |
| Methods inherited from class org.openbp.server.persistence.BasicPersistenceContextProvider |
|---|
createEntity, determineEntityClass, initialize, instantiateEntity, isTransactional, obtainExistingPersistenceContext, obtainPersistenceContext, setApplicationContext, setTransactional, toString, tryEntityDefaults, unbindThreadContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected transient org.hibernate.SessionFactory sessionFactory
| Constructor Detail |
|---|
public HibernatePersistenceContextProvider()
| Method Detail |
|---|
public void shutdown()
shutdown in interface PersistenceContextProvidershutdown in class BasicPersistenceContextProvider
protected PersistenceContext createPersistenceContext()
throws PersistenceException
createPersistenceContext in class BasicPersistenceContextProviderPersistenceException - On error (e. g. if there is no database defined or a database session cannot be established)public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
protected org.hibernate.SessionFactory createSessionFactory()
throws PersistenceException
PersistenceException - On error (e. g. database/hibernate.properties missing or invalid)public org.hibernate.cfg.Configuration createHibernateConfiguration()
public static void addOpenBPClassMappingsToConfiguration(org.hibernate.cfg.Configuration configuration)
configuration - The configuration
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||