Package org.nuxeo.ecm.core.persistence
Class HibernateConfiguration
- java.lang.Object
-
- org.nuxeo.ecm.core.persistence.HibernateConfiguration
-
- All Implemented Interfaces:
EntityManagerFactoryProvider
public class HibernateConfiguration extends Object implements EntityManagerFactoryProvider
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HibernateConfiguration.NuxeoTransactionManagerLookup
Hibernate Transaction Manager Lookup that uses our framework.
-
Field Summary
Fields Modifier and Type Field Description List<Class<?>>
annotedClasses
protected org.hibernate.ejb.Ejb3Configuration
cfg
Properties
hibernateProperties
static String
JTA
String
name
static String
RESOURCE_LOCAL
static String
TXTYPE_PROPERTY_NAME
-
Constructor Summary
Constructors Constructor Description HibernateConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAnnotedClass(Class<?> annotedClass)
protected javax.persistence.EntityManagerFactory
createEntityManagerFactory(Map<String,String> properties)
javax.persistence.EntityManagerFactory
getFactory()
javax.persistence.EntityManagerFactory
getFactory(String txType)
static String
getTxType()
static HibernateConfiguration
load(URL location)
void
merge(HibernateConfiguration other)
void
removeAnnotedClass(Class<?> annotedClass)
void
setDatasource(String name)
org.hibernate.ejb.Ejb3Configuration
setupConfiguration()
org.hibernate.ejb.Ejb3Configuration
setupConfiguration(Map<String,String> properties)
-
-
-
Field Detail
-
RESOURCE_LOCAL
public static final String RESOURCE_LOCAL
-
JTA
public static final String JTA
-
TXTYPE_PROPERTY_NAME
public static final String TXTYPE_PROPERTY_NAME
- See Also:
- Constant Field Values
-
name
public String name
-
hibernateProperties
public final Properties hibernateProperties
-
cfg
protected org.hibernate.ejb.Ejb3Configuration cfg
-
-
Method Detail
-
setDatasource
public void setDatasource(String name)
-
addAnnotedClass
public void addAnnotedClass(Class<?> annotedClass)
-
removeAnnotedClass
public void removeAnnotedClass(Class<?> annotedClass)
-
setupConfiguration
public org.hibernate.ejb.Ejb3Configuration setupConfiguration()
-
setupConfiguration
public org.hibernate.ejb.Ejb3Configuration setupConfiguration(Map<String,String> properties)
-
getFactory
public javax.persistence.EntityManagerFactory getFactory(String txType)
- Specified by:
getFactory
in interfaceEntityManagerFactoryProvider
-
createEntityManagerFactory
protected javax.persistence.EntityManagerFactory createEntityManagerFactory(Map<String,String> properties)
-
getFactory
public javax.persistence.EntityManagerFactory getFactory()
- Specified by:
getFactory
in interfaceEntityManagerFactoryProvider
-
getTxType
public static String getTxType()
-
load
public static HibernateConfiguration load(URL location)
-
merge
public void merge(HibernateConfiguration other)
-
-