Top Description Inners Fields Constructors Methods
org.hibernate.event.internal

public Class EntityCopyObserverFactoryInitiator

extends Object
implements StandardServiceInitiator<EntityCopyObserverFactory>
Class Inheritance
All Implemented Interfaces
org.hibernate.boot.registry.StandardServiceInitiator, org.hibernate.service.spi.ServiceInitiator
Imports
java.util.Map, org.hibernate.HibernateException, org.hibernate.boot.registry.StandardServiceInitiator, org.hibernate.boot.registry.selector.spi.StrategySelector, org.hibernate.cfg.AvailableSettings, org.hibernate.event.spi.EntityCopyObserver, .EntityCopyObserverFactory, org.hibernate.internal.CoreLogging, .CoreMessageLogger, org.hibernate.service.spi.ServiceRegistryImplementor

Looks for the configuration property AvailableSettings#MERGE_ENTITY_COPY_OBSERVER and registers the matching EntityCopyObserverFactory 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.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
public static final EntityCopyObserverFactoryInitiator
private static final CoreMessageLogger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private Object
getConfigurationValue(final Map<K, V> configurationValues)

public Class<EntityCopyObserverFactory>
getServiceInitiated()

Implements org.hibernate.service.spi.ServiceInitiator.getServiceInitiated.

Obtains the service role initiated by this initiator.
public EntityCopyObserverFactory
initiateService(final Map<K, V>
The configuration values in effect
configurationValues
,
final ServiceRegistryImplementor
The service registry. Can be used to locate services needed to fulfill initiation.
registry
)

Implements org.hibernate.boot.registry.StandardServiceInitiator.initiateService.

Initiates the managed service.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final EntityCopyObserverFactoryInitiator INSTANCE
LOGback to summary
private static final CoreMessageLogger LOG

Constructor Detail

EntityCopyObserverFactoryInitiatorback to summary
public EntityCopyObserverFactoryInitiator()

Method Detail

getConfigurationValueback to summary
private Object getConfigurationValue(final Map<K, V> configurationValues)
getServiceInitiatedback to summary
public Class<EntityCopyObserverFactory> getServiceInitiated()

Implements org.hibernate.service.spi.ServiceInitiator.getServiceInitiated.

Doc from org.hibernate.service.spi.ServiceInitiator.getServiceInitiated.

Obtains the service role initiated by this initiator. Should be unique within a registry

Returns:Class<EntityCopyObserverFactory>

The service role.

Annotations
@Override
initiateServiceback to summary
public EntityCopyObserverFactory initiateService(final Map<K, V> configurationValues, final ServiceRegistryImplementor registry)

Implements org.hibernate.boot.registry.StandardServiceInitiator.initiateService.

Doc from org.hibernate.boot.registry.StandardServiceInitiator.initiateService.

Initiates the managed service.

Parameters
configurationValues:Map<K, V>

The configuration values in effect

registry:ServiceRegistryImplementor

The service registry. Can be used to locate services needed to fulfill initiation.

Returns:EntityCopyObserverFactory

The initiated service.

Annotations
@Override
org.hibernate.event.internal back to summary

private Class EntityCopyObserverFactoryInitiator.EntityObserversFactoryFromClass

extends Object
implements EntityCopyObserverFactory
Class Inheritance
  • java.lang.Object
  • org.hibernate.event.internal.EntityCopyObserverFactoryInitiator.EntityObserversFactoryFromClass
All Implemented Interfaces
org.hibernate.event.spi.EntityCopyObserverFactory, org.hibernate.service.Service, java.io.Serializable

Field Summary

Modifier and TypeField and Description
private final Class<T>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public EntityCopyObserver
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

valueback to summary
private final Class<T> value

Constructor Detail

EntityObserversFactoryFromClassback to summary
public EntityObserversFactoryFromClass(Class<T> value)

Method Detail

createEntityCopyObserverback to summary
public EntityCopyObserver createEntityCopyObserver()

Implements org.hibernate.event.spi.EntityCopyObserverFactory.createEntityCopyObserver.

Annotations
@Override