Top Description Fields Constructors Methods
org.hibernate.engine.jdbc.dialect.internal

public Class DialectFactoryImpl

extends Object
implements DialectFactory, ServiceRegistryAwareService
Class Inheritance
All Implemented Interfaces
org.hibernate.service.spi.ServiceRegistryAwareService, org.hibernate.engine.jdbc.dialect.spi.DialectFactory, org.hibernate.service.Service, java.io.Serializable
Imports
java.util.Map, org.hibernate.HibernateException, org.hibernate.boot.registry.selector.spi.StrategySelector, org.hibernate.cfg.AvailableSettings, org.hibernate.dialect.Dialect, org.hibernate.engine.jdbc.dialect.spi.DialectFactory, .DialectResolutionInfo, .DialectResolutionInfoSource, .DialectResolver, org.hibernate.internal.util.StringHelper, org.hibernate.service.spi.ServiceRegistryAwareService, .ServiceRegistryImplementor

Standard implementation of the DialectFactory service.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private DialectResolver
private StrategySelector

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Dialect
buildDialect(Map<K, V>
The configuration properties.
configValues
,
DialectResolutionInfoSource
Access to DialectResolutionInfo used to resolve the Dialect to use if not explicitly named
resolutionInfoSource
)

Implements org.hibernate.engine.jdbc.dialect.spi.DialectFactory.buildDialect.

Builds an appropriate Dialect instance.
private Dialect
constructDialect(Object dialectReference)

private Dialect

Returns:

The appropriate dialect instance.
determineDialect
(DialectResolutionInfoSource
Access to DialectResolutionInfo used to resolve the Dialect.
resolutionInfoSource
)

Determine the appropriate Dialect to use given the connection.

public void
injectServices(ServiceRegistryImplementor
The registry
serviceRegistry
)

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

Callback to inject the registry.
private boolean
isEmpty(Object dialectReference)

public void
setDialectResolver(DialectResolver
The DialectResolver to use
dialectResolver
)

Intended only for use from testing.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dialectResolverback to summary
private DialectResolver dialectResolver
strategySelectorback to summary
private StrategySelector strategySelector

Constructor Detail

DialectFactoryImplback to summary
public DialectFactoryImpl()

Method Detail

buildDialectback to summary
public Dialect buildDialect(Map<K, V> configValues, DialectResolutionInfoSource resolutionInfoSource) throws HibernateException

Implements org.hibernate.engine.jdbc.dialect.spi.DialectFactory.buildDialect.

Doc from org.hibernate.engine.jdbc.dialect.spi.DialectFactory.buildDialect.

Builds an appropriate Dialect instance.

If a dialect is explicitly named in the incoming properties, it should used. Otherwise, it is determined by dialect resolvers based on the passed connection.

An exception is thrown if a dialect was not explicitly set and no resolver could make the determination from the given connection.

Parameters
configValues:Map<K, V>

The configuration properties.

resolutionInfoSource:DialectResolutionInfoSource

Access to DialectResolutionInfo used to resolve the Dialect to use if not explicitly named

Returns:Dialect

The appropriate dialect instance.

Annotations
@Override
Exceptions
HibernateException:
No dialect specified and no resolver could make the determination.
constructDialectback to summary
private Dialect constructDialect(Object dialectReference)
determineDialectback to summary
private Dialect determineDialect(DialectResolutionInfoSource resolutionInfoSource)

Determine the appropriate Dialect to use given the connection.

Parameters
resolutionInfoSource:DialectResolutionInfoSource

Access to DialectResolutionInfo used to resolve the Dialect.

Returns:Dialect

The appropriate dialect instance.

Exceptions
HibernateException:
No connection given or no resolver could make the determination from the given connection.
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
isEmptyback to summary
private boolean isEmpty(Object dialectReference)
Annotations
@SuppressWarnings:SimplifiableIfStatement
setDialectResolverback to summary
public void setDialectResolver(DialectResolver dialectResolver)

Intended only for use from testing.

Parameters
dialectResolver:DialectResolver

The DialectResolver to use