org.hibernate.service.config.internal
Class ConfigurationServiceImpl

java.lang.Object
  extended by org.hibernate.service.config.internal.ConfigurationServiceImpl
All Implemented Interfaces:
Serializable, ConfigurationService, Service, ServiceRegistryAwareService

public class ConfigurationServiceImpl
extends Object
implements ConfigurationService, ServiceRegistryAwareService

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.hibernate.service.config.spi.ConfigurationService
ConfigurationService.Converter<T>
 
Constructor Summary
ConfigurationServiceImpl(Map settings)
           
 
Method Summary
<T> T
cast(Class<T> expected, Object candidate)
          Cast candidate to the instance of expected type.
<T> T
getSetting(String name, Class<T> expected, T defaultValue)
           
<T> T
getSetting(String name, ConfigurationService.Converter<T> converter)
           
<T> T
getSetting(String name, ConfigurationService.Converter<T> converter, T defaultValue)
           
 Map getSettings()
           
 void injectServices(ServiceRegistryImplementor serviceRegistry)
          Callback to inject the registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationServiceImpl

public ConfigurationServiceImpl(Map settings)
Method Detail

getSettings

public Map getSettings()
Specified by:
getSettings in interface ConfigurationService

injectServices

public void injectServices(ServiceRegistryImplementor serviceRegistry)
Description copied from interface: ServiceRegistryAwareService
Callback to inject the registry.

Specified by:
injectServices in interface ServiceRegistryAwareService
Parameters:
serviceRegistry - The registry

getSetting

public <T> T getSetting(String name,
                        ConfigurationService.Converter<T> converter)
Specified by:
getSetting in interface ConfigurationService

getSetting

public <T> T getSetting(String name,
                        ConfigurationService.Converter<T> converter,
                        T defaultValue)
Specified by:
getSetting in interface ConfigurationService

getSetting

public <T> T getSetting(String name,
                        Class<T> expected,
                        T defaultValue)
Specified by:
getSetting in interface ConfigurationService

cast

public <T> T cast(Class<T> expected,
                  Object candidate)
Description copied from interface: ConfigurationService
Cast candidate to the instance of expected type.

Specified by:
cast in interface ConfigurationService
Parameters:
expected - The type of instance expected to return.
candidate - The candidate object to be casted.
Returns:
The instance of expected type or null if this cast fail.


Copyright © 2001-2015 Red Hat, Inc. All Rights Reserved.