Top Description Fields Constructors Methods
org.hibernate.engine.config.internal

public Class ConfigurationServiceImpl

extends Object
implements ConfigurationService, ServiceRegistryAwareService
Class Inheritance
All Implemented Interfaces
org.hibernate.service.spi.ServiceRegistryAwareService, org.hibernate.engine.config.spi.ConfigurationService, org.hibernate.service.Service, java.io.Serializable
Imports
java.util.Collections, .Map, org.hibernate.boot.registry.classloading.spi.ClassLoaderService, .ClassLoadingException, org.hibernate.engine.config.spi.ConfigurationService, org.hibernate.internal.CoreMessageLogger, org.hibernate.internal.util.NullnessUtil, org.hibernate.service.spi.ServiceRegistryAwareService, .ServiceRegistryImplementor, org.jboss.logging.Logger, org.checkerframework.checker.nullness.qual.Nullable, .PolyNull

The standard ConfigurationService implementation.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private static final CoreMessageLogger
private ServiceRegistryImplementor
private final Map<String, Object>

Constructor Summary

AccessConstructor and Description
public
ConfigurationServiceImpl(Map<String, Object>
The map of settings
settings
)

Constructs a ConfigurationServiceImpl

Method Summary

Modifier and TypeMethod and Description
public <T> @Nullable T
cast(Class<T> expected, @Nullable Object candidate)

public <T> @Nullable T
getSetting(String
The name of the setting to get.
name
,
ConfigurationService.Converter<T>
The converter to apply
converter
)

Implements org.hibernate.engine.config.spi.ConfigurationService.getSetting.

Get the named setting, using the specified converter.
public <T> @PolyNull T
getSetting(String name, ConfigurationService.Converter<T> converter, @PolyNull T defaultValue)

public <T> @PolyNull T
getSetting(String name, Class<T> expected, @PolyNull T defaultValue)

public Map<String, Object>
getSettings()

Implements org.hibernate.engine.config.spi.ConfigurationService.getSettings.

Access to the complete map of config settings.
public void
injectServices(ServiceRegistryImplementor
The registry
serviceRegistry
)

Implements org.hibernate.service.spi.ServiceRegistryAwareService.injectServices.

Callback to inject the registry.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LOGback to summary
private static final CoreMessageLogger LOG
serviceRegistryback to summary
private ServiceRegistryImplementor serviceRegistry
settingsback to summary
private final Map<String, Object> settings

Constructor Detail

ConfigurationServiceImplback to summary
public ConfigurationServiceImpl(Map<String, Object> settings)

Constructs a ConfigurationServiceImpl

Parameters
settings:Map<String, Object>

The map of settings

Method Detail

castback to summary
public <T> @Nullable T cast(Class<T> expected, @Nullable Object candidate)
Annotations
@SuppressWarnings:unchecked
getSettingback to summary
public <T> @Nullable T getSetting(String name, ConfigurationService.Converter<T> converter)

Implements org.hibernate.engine.config.spi.ConfigurationService.getSetting.

Doc from org.hibernate.engine.config.spi.ConfigurationService.getSetting.

Get the named setting, using the specified converter.

Parameters
<T>
The Java type of the conversion
name:String

The name of the setting to get.

converter:ConfigurationService.Converter<T>

The converter to apply

Returns:@Nullable T

The converted (typed) setting. May return null (see getSetting(String, Class, Object))

Annotations
@Override
getSettingback to summary
public <T> @PolyNull T getSetting(String name, ConfigurationService.Converter<T> converter, @PolyNull T defaultValue)
Annotations
@Override
getSettingback to summary
public <T> @PolyNull T getSetting(String name, Class<T> expected, @PolyNull T defaultValue)
Annotations
@Override
getSettingsback to summary
public Map<String, Object> getSettings()

Implements org.hibernate.engine.config.spi.ConfigurationService.getSettings.

Doc from org.hibernate.engine.config.spi.ConfigurationService.getSettings.

Access to the complete map of config settings. The returned map is immutable

Returns:Map<String, Object>

The immutable map of config settings.

Annotations
@Override
injectServicesback to summary
public void injectServices(ServiceRegistryImplementor serviceRegistry)

Implements org.hibernate.service.spi.ServiceRegistryAwareService.injectServices.

Doc from org.hibernate.service.spi.ServiceRegistryAwareService.injectServices.

Callback to inject the registry.

Parameters
serviceRegistry:ServiceRegistryImplementor

The registry

Annotations
@Override