Package org.nuxeo.ecm.core.persistence
Class PersistenceComponent
- java.lang.Object
-
- org.nuxeo.runtime.model.DefaultComponent
-
- org.nuxeo.ecm.core.persistence.PersistenceComponent
-
- All Implemented Interfaces:
HibernateConfigurator
,PersistenceProviderFactory
,Adaptable
,Component
,Extensible
,TimestampedService
public class PersistenceComponent extends DefaultComponent implements HibernateConfigurator, PersistenceProviderFactory
- Author:
- Stephane Lacoin [aka matic]
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,HibernateConfiguration>
registry
-
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
-
Constructor Summary
Constructors Constructor Description PersistenceComponent()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doPatchForTests(Properties hibernateProperties)
int
getApplicationStartedOrder()
The component notification order forComponent.applicationStarted(org.nuxeo.runtime.model.ComponentContext)
.HibernateConfiguration
getHibernateConfiguration(String name)
PersistenceProvider
newProvider(String name)
void
registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
protected void
registerHibernateContribution(HibernateConfiguration contribution, ComponentName contributorName)
protected static void
registerOracle12DialectResolver()
Registers with Hibernate a dialect resolver to recognize Oracle 12.void
start(ComponentContext context)
Start the component.-
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, stop, unregister, unregisterContribution, unregisterExtension
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.runtime.model.Component
applicationStarted
-
-
-
-
Field Detail
-
registry
protected final Map<String,HibernateConfiguration> registry
-
-
Method Detail
-
registerOracle12DialectResolver
protected static void registerOracle12DialectResolver()
Registers with Hibernate a dialect resolver to recognize Oracle 12.- Since:
- 7.2
-
getApplicationStartedOrder
public int getApplicationStartedOrder()
Description copied from interface:Component
The component notification order forComponent.applicationStarted(org.nuxeo.runtime.model.ComponentContext)
.Components are notified in increasing order. Order 1000 is the default order for components that don't care. Order 100 is the repository initialization.
- Specified by:
getApplicationStartedOrder
in interfaceComponent
- Returns:
- the order, 1000 by default
-
start
public void start(ComponentContext context)
Description copied from interface:Component
Start the component. This method is called after all the components were resolved and activated- Specified by:
start
in interfaceComponent
- Overrides:
start
in classDefaultComponent
-
registerContribution
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
- Overrides:
registerContribution
in classDefaultComponent
-
registerHibernateContribution
protected void registerHibernateContribution(HibernateConfiguration contribution, ComponentName contributorName)
-
doPatchForTests
protected void doPatchForTests(Properties hibernateProperties)
-
newProvider
public PersistenceProvider newProvider(String name)
- Specified by:
newProvider
in interfacePersistenceProviderFactory
-
getHibernateConfiguration
public HibernateConfiguration getHibernateConfiguration(String name)
- Specified by:
getHibernateConfiguration
in interfaceHibernateConfigurator
-
-