Class RecordableBootstrap
java.lang.Object
org.hibernate.boot.registry.StandardServiceRegistryBuilder
io.quarkus.hibernate.orm.runtime.recording.RecordableBootstrap
public final class RecordableBootstrap
extends org.hibernate.boot.registry.StandardServiceRegistryBuilder
Has to extend StandardServiceRegistryBuilder even if we don't want: needs to
be assignable to it.
-
Field Summary
Fields inherited from class org.hibernate.boot.registry.StandardServiceRegistryBuilder
DEFAULT_CFG_RESOURCE_NAME
-
Constructor Summary
ConstructorDescriptionRecordableBootstrap
(org.hibernate.boot.registry.BootstrapServiceRegistry bootstrapServiceRegistry, InitialInitiatorListProvider initialInitiatorsProvider) -
Method Summary
Modifier and TypeMethodDescriptionorg.hibernate.boot.registry.StandardServiceRegistryBuilder
addInitiator
(org.hibernate.boot.registry.StandardServiceInitiator<?> initiator) Adds a service initiator.<T extends org.hibernate.service.Service>
org.hibernate.boot.registry.StandardServiceRegistryBuilderaddService
(Class<T> serviceRole, T service) Adds a user-provided service.org.hibernate.boot.registry.StandardServiceRegistryBuilder
applySetting
(String settingName, Object value) Apply a setting value.org.hibernate.boot.registry.StandardServiceRegistryBuilder
applySettings
(Map<String, Object> settings) Apply a groups of setting values.org.hibernate.boot.registry.StandardServiceRegistry
build()
Build the StandardServiceRegistry.void
org.hibernate.boot.registry.StandardServiceRegistryBuilder
Read setting information from an XML file using the standard resource location.org.hibernate.boot.registry.StandardServiceRegistryBuilder
org.hibernate.boot.registry.StandardServiceRegistryBuilder
org.hibernate.boot.registry.StandardServiceRegistryBuilder
org.hibernate.boot.registry.StandardServiceRegistryBuilder
configure
(org.hibernate.boot.cfgxml.spi.LoadedConfig loadedConfig) static void
destroy
(org.hibernate.service.ServiceRegistry serviceRegistry) Destroy a service registry.org.hibernate.boot.registry.StandardServiceRegistryBuilder
By default, when a ServiceRegistry is no longer referenced by any other registries as a parent it will be closed.org.hibernate.boot.registry.StandardServiceRegistryBuilder
See the discussion ondisableAutoClose()
.org.hibernate.boot.cfgxml.spi.LoadedConfig
Intended for internal testing use only!!org.hibernate.boot.registry.BootstrapServiceRegistry
List<org.hibernate.service.internal.ProvidedService<?>>
Deprecated.Temporarily exposed since Configuration is still around and much code still uses Configuration.org.hibernate.boot.registry.StandardServiceRegistryBuilder
loadProperties
(File file) org.hibernate.boot.registry.StandardServiceRegistryBuilder
loadProperties
(String resourceName) Methods inherited from class org.hibernate.boot.registry.StandardServiceRegistryBuilder
applySettings, forJpa, getConfigLoader
-
Constructor Details
-
RecordableBootstrap
public RecordableBootstrap(org.hibernate.boot.registry.BootstrapServiceRegistry bootstrapServiceRegistry, InitialInitiatorListProvider initialInitiatorsProvider)
-
-
Method Details
-
getAggregatedCfgXml
public org.hibernate.boot.cfgxml.spi.LoadedConfig getAggregatedCfgXml()Intended for internal testing use only!!- Overrides:
getAggregatedCfgXml
in classorg.hibernate.boot.registry.StandardServiceRegistryBuilder
-
getBootstrapServiceRegistry
public org.hibernate.boot.registry.BootstrapServiceRegistry getBootstrapServiceRegistry()- Overrides:
getBootstrapServiceRegistry
in classorg.hibernate.boot.registry.StandardServiceRegistryBuilder
-
loadProperties
public org.hibernate.boot.registry.StandardServiceRegistryBuilder loadProperties(String resourceName) - Overrides:
loadProperties
in classorg.hibernate.boot.registry.StandardServiceRegistryBuilder
-
loadProperties
- Overrides:
loadProperties
in classorg.hibernate.boot.registry.StandardServiceRegistryBuilder
-
configure
public org.hibernate.boot.registry.StandardServiceRegistryBuilder configure()Read setting information from an XML file using the standard resource location.- Overrides:
configure
in classorg.hibernate.boot.registry.StandardServiceRegistryBuilder
- Returns:
- this, for method chaining
- See Also:
-
StandardServiceRegistryBuilder.DEFAULT_CFG_RESOURCE_NAME
configure(String)
loadProperties(String)
-
configure
- Overrides:
configure
in classorg.hibernate.boot.registry.StandardServiceRegistryBuilder
-
configure
- Overrides:
configure
in classorg.hibernate.boot.registry.StandardServiceRegistryBuilder
-
configure
- Overrides:
configure
in classorg.hibernate.boot.registry.StandardServiceRegistryBuilder
-
configure
public org.hibernate.boot.registry.StandardServiceRegistryBuilder configure(org.hibernate.boot.cfgxml.spi.LoadedConfig loadedConfig) - Overrides:
configure
in classorg.hibernate.boot.registry.StandardServiceRegistryBuilder
-
applySetting
public org.hibernate.boot.registry.StandardServiceRegistryBuilder applySetting(String settingName, Object value) Apply a setting value.- Overrides:
applySetting
in classorg.hibernate.boot.registry.StandardServiceRegistryBuilder
- Parameters:
settingName
- The name of the settingvalue
- The value to use.- Returns:
- this, for method chaining
-
applySettings
public org.hibernate.boot.registry.StandardServiceRegistryBuilder applySettings(Map<String, Object> settings) Apply a groups of setting values.- Overrides:
applySettings
in classorg.hibernate.boot.registry.StandardServiceRegistryBuilder
- Parameters:
settings
- The incoming settings to apply- Returns:
- this, for method chaining
-
clearSettings
public void clearSettings()- Overrides:
clearSettings
in classorg.hibernate.boot.registry.StandardServiceRegistryBuilder
-
addInitiator
public org.hibernate.boot.registry.StandardServiceRegistryBuilder addInitiator(org.hibernate.boot.registry.StandardServiceInitiator<?> initiator) Adds a service initiator.- Overrides:
addInitiator
in classorg.hibernate.boot.registry.StandardServiceRegistryBuilder
- Parameters:
initiator
- The initiator to be added- Returns:
- this, for method chaining
-
addService
public <T extends org.hibernate.service.Service> org.hibernate.boot.registry.StandardServiceRegistryBuilder addService(Class<T> serviceRole, T service) Adds a user-provided service.- Overrides:
addService
in classorg.hibernate.boot.registry.StandardServiceRegistryBuilder
- Parameters:
serviceRole
- The role of the service being addedservice
- The service implementation- Returns:
- this, for method chaining
-
disableAutoClose
public org.hibernate.boot.registry.StandardServiceRegistryBuilder disableAutoClose()By default, when a ServiceRegistry is no longer referenced by any other registries as a parent it will be closed. Some applications that explicitly build "shared registries" may want to circumvent that behavior. This method indicates that the registry being built should not be automatically closed. The caller agrees to take responsibility to close it themselves.- Overrides:
disableAutoClose
in classorg.hibernate.boot.registry.StandardServiceRegistryBuilder
- Returns:
- this, for method chaining
-
enableAutoClose
public org.hibernate.boot.registry.StandardServiceRegistryBuilder enableAutoClose()See the discussion ondisableAutoClose()
. This method enables the auto-closing.- Overrides:
enableAutoClose
in classorg.hibernate.boot.registry.StandardServiceRegistryBuilder
- Returns:
- this, for method chaining
-
build
public org.hibernate.boot.registry.StandardServiceRegistry build()Build the StandardServiceRegistry.- Overrides:
build
in classorg.hibernate.boot.registry.StandardServiceRegistryBuilder
- Returns:
- The StandardServiceRegistry.
-
getProvidedServices
-
getSettings
Deprecated.Temporarily exposed since Configuration is still around and much code still uses Configuration. This allows code to configure the builder and access that to configure Configuration object.Temporarily exposed since Configuration is still around and much code still uses Configuration. This allows code to configure the builder and access that to configure Configuration object (used from HEM atm).- Overrides:
getSettings
in classorg.hibernate.boot.registry.StandardServiceRegistryBuilder
- Returns:
- The settings map.
-
destroy
public static void destroy(org.hibernate.service.ServiceRegistry serviceRegistry) Destroy a service registry. Applications should only destroy registries they have explicitly created.- Parameters:
serviceRegistry
- The registry to be closed.
-
getPostBuildProvidedServices
- Returns:
- the list of services to get from the service registry and turn into provided services
-