Class DialectFactoryImpl
- java.lang.Object
-
- org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl
-
- All Implemented Interfaces:
Serializable,DialectFactory,Service,ServiceRegistryAwareService
public class DialectFactoryImpl extends Object implements DialectFactory, ServiceRegistryAwareService
Standard implementation of theDialectFactoryservice.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DialectFactoryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DialectbuildDialect(Map<String,Object> configValues, DialectResolutionInfoSource resolutionInfoSource)Builds an appropriate Dialect instance.voidinjectServices(ServiceRegistryImplementor serviceRegistry)Callback to inject the registry.voidsetDialectResolver(DialectResolver dialectResolver)Intended only for use from testing.
-
-
-
Method Detail
-
injectServices
public void injectServices(ServiceRegistryImplementor serviceRegistry)
Description copied from interface:ServiceRegistryAwareServiceCallback to inject the registry.- Specified by:
injectServicesin interfaceServiceRegistryAwareService- Parameters:
serviceRegistry- The registry
-
setDialectResolver
public void setDialectResolver(DialectResolver dialectResolver)
Intended only for use from testing.- Parameters:
dialectResolver- The DialectResolver to use
-
buildDialect
public Dialect buildDialect(Map<String,Object> configValues, DialectResolutionInfoSource resolutionInfoSource) throws HibernateException
Description copied from interface:DialectFactoryBuilds 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.
- Specified by:
buildDialectin interfaceDialectFactory- Parameters:
configValues- The configuration properties.resolutionInfoSource- Access to DialectResolutionInfo used to resolve the Dialect to use if not explicitly named- Returns:
- The appropriate dialect instance.
- Throws:
HibernateException- No dialect specified and no resolver could make the determination.
-
-