public class DefaultIdentifierGeneratorFactory extends Object implements MutableIdentifierGeneratorFactory, Serializable, ServiceRegistryAwareService
IdentifierGeneratorFactory
implementations.Constructor and Description |
---|
DefaultIdentifierGeneratorFactory()
Constructs a new DefaultIdentifierGeneratorFactory.
|
Modifier and Type | Method and Description |
---|---|
IdentifierGenerator |
createIdentifierGenerator(String strategy,
Type type,
Properties config)
Given a strategy, retrieve the appropriate identifier generator instance.
|
Dialect |
getDialect()
Get the dialect.
|
Class |
getIdentifierGeneratorClass(String strategy)
Retrieve the class that will be used as the
IdentifierGenerator for the given strategy. |
void |
injectServices(ServiceRegistryImplementor serviceRegistry)
Callback to inject the registry.
|
void |
register(String strategy,
Class generatorClass) |
void |
setDialect(Dialect dialect)
Allow injection of the dialect to use.
|
public DefaultIdentifierGeneratorFactory()
public void register(String strategy, Class generatorClass)
register
in interface MutableIdentifierGeneratorFactory
public Dialect getDialect()
IdentifierGeneratorFactory
getDialect
in interface IdentifierGeneratorFactory
public void setDialect(Dialect dialect)
IdentifierGeneratorFactory
setDialect
in interface IdentifierGeneratorFactory
dialect
- The dialectpublic IdentifierGenerator createIdentifierGenerator(String strategy, Type type, Properties config)
IdentifierGeneratorFactory
createIdentifierGenerator
in interface IdentifierGeneratorFactory
strategy
- The generation strategy.type
- The mapping type for the identifier values.config
- Any configuraion properties given in the generator mapping.public Class getIdentifierGeneratorClass(String strategy)
IdentifierGeneratorFactory
IdentifierGenerator
for the given strategy.getIdentifierGeneratorClass
in interface IdentifierGeneratorFactory
strategy
- The strategypublic void injectServices(ServiceRegistryImplementor serviceRegistry)
ServiceRegistryAwareService
injectServices
in interface ServiceRegistryAwareService
serviceRegistry
- The registryCopyright © 2012 JBoss by Red Hat. All Rights Reserved.