org.hibernate.engine.config.spi.ConfigurationService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-core Show documentation
Show all versions of hibernate-core Show documentation
Hibernate's core ORM functionality
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later.
* See the lgpl.txt file in the root directory or .
*/
package org.hibernate.engine.config.spi;
import java.util.Map;
import java.util.function.Function;
import java.util.function.Supplier;
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
import org.hibernate.service.Service;
/**
* Provides access to the initial user-provided configuration values. Generally speaking
* these values come from:
* - Calls to {@link StandardServiceRegistryBuilder#loadProperties}
* - Calls to {@link StandardServiceRegistryBuilder#applySetting}
* - Calls to {@link StandardServiceRegistryBuilder#applySettings}
* - Calls to {@link StandardServiceRegistryBuilder#configure}
*
*
* @author Steve Ebersole
*/
public interface ConfigurationService extends Service {
/**
* Access to the complete map of config settings. The returned map is immutable
*
* @return The immutable map of config settings.
*/
Map getSettings();
/**
* Get the named setting, using the specified converter.
*
* @param name The name of the setting to get.
* @param converter The converter to apply
* @param The Java type of the conversion
*
* @return The converted (typed) setting. May return {@code null} (see {@link #getSetting(String, Class, Object)})
*/
default T getSetting(String name, Converter converter) {
return getSetting( name, (Function