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 voiddoPatchForTests(Properties hibernateProperties)intgetApplicationStartedOrder()The component notification order forComponent.applicationStarted(org.nuxeo.runtime.model.ComponentContext).HibernateConfigurationgetHibernateConfiguration(String name)PersistenceProvidernewProvider(String name)voidregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)protected voidregisterHibernateContribution(HibernateConfiguration contribution, ComponentName contributorName)protected static voidregisterOracle12DialectResolver()Registers with Hibernate a dialect resolver to recognize Oracle 12.voidstart(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:ComponentThe 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:
getApplicationStartedOrderin interfaceComponent- Returns:
- the order, 1000 by default
-
start
public void start(ComponentContext context)
Description copied from interface:ComponentStart the component. This method is called after all the components were resolved and activated- Specified by:
startin interfaceComponent- Overrides:
startin classDefaultComponent
-
registerContribution
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
- Overrides:
registerContributionin classDefaultComponent
-
registerHibernateContribution
protected void registerHibernateContribution(HibernateConfiguration contribution, ComponentName contributorName)
-
doPatchForTests
protected void doPatchForTests(Properties hibernateProperties)
-
newProvider
public PersistenceProvider newProvider(String name)
- Specified by:
newProviderin interfacePersistenceProviderFactory
-
getHibernateConfiguration
public HibernateConfiguration getHibernateConfiguration(String name)
- Specified by:
getHibernateConfigurationin interfaceHibernateConfigurator
-
-