Package org.hibernate.event.internal
Class EntityCopyObserverFactoryInitiator
- java.lang.Object
-
- org.hibernate.event.internal.EntityCopyObserverFactoryInitiator
-
- All Implemented Interfaces:
StandardServiceInitiator<EntityCopyObserverFactory>
,ServiceInitiator<EntityCopyObserverFactory>
public class EntityCopyObserverFactoryInitiator extends Object implements StandardServiceInitiator<EntityCopyObserverFactory>
Looks for the configuration property "hibernate.event.merge.entity_copy_observer" and registers the matchingEntityCopyObserverFactory
based on the configuration value.For known implementations some optimisations are possible, such as reusing a singleton for the stateless implementations. When a user plugs in a custom
EntityCopyObserver
we take a defensive approach.
-
-
Field Summary
Fields Modifier and Type Field Description static EntityCopyObserverFactoryInitiator
INSTANCE
-
Constructor Summary
Constructors Constructor Description EntityCopyObserverFactoryInitiator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<EntityCopyObserverFactory>
getServiceInitiated()
Obtains the service role initiated by this initiator.EntityCopyObserverFactory
initiateService(Map<String,Object> configurationValues, ServiceRegistryImplementor registry)
Initiates the managed service.
-
-
-
Field Detail
-
INSTANCE
public static final EntityCopyObserverFactoryInitiator INSTANCE
-
-
Method Detail
-
initiateService
public EntityCopyObserverFactory initiateService(Map<String,Object> configurationValues, ServiceRegistryImplementor registry)
Description copied from interface:StandardServiceInitiator
Initiates the managed service.- Specified by:
initiateService
in interfaceStandardServiceInitiator<EntityCopyObserverFactory>
- Parameters:
configurationValues
- The configuration values in effectregistry
- The service registry. Can be used to locate services needed to fulfill initiation.- Returns:
- The initiated service.
-
getServiceInitiated
public Class<EntityCopyObserverFactory> getServiceInitiated()
Description copied from interface:ServiceInitiator
Obtains the service role initiated by this initiator. Should be unique within a registry- Specified by:
getServiceInitiated
in interfaceServiceInitiator<EntityCopyObserverFactory>
- Returns:
- The service role.
-
-