org.hibernate.id.factory
public class DefaultIdentifierGeneratorFactory extends java.lang.Object implements IdentifierGeneratorFactory, java.io.Serializable
IdentifierGeneratorFactory
implementations.Constructor and Description |
---|
DefaultIdentifierGeneratorFactory()
Constructs a new DefaultIdentifierGeneratorFactory.
|
Modifier and Type | Method and Description |
---|---|
IdentifierGenerator |
createIdentifierGenerator(java.lang.String strategy,
Type type,
java.util.Properties config)
Given a strategy, retrieve the appropriate identifier generator instance.
|
java.lang.Class |
getIdentifierGeneratorClass(java.lang.String strategy)
Retrieve the class that will be used as the
IdentifierGenerator for the given strategy. |
void |
register(java.lang.String strategy,
java.lang.Class generatorClass) |
void |
setDialect(Dialect dialect)
Allow injection of the dialect to use.
|
public DefaultIdentifierGeneratorFactory()
public void setDialect(Dialect dialect)
setDialect
in interface IdentifierGeneratorFactory
dialect
- The dialectpublic void register(java.lang.String strategy, java.lang.Class generatorClass)
public IdentifierGenerator createIdentifierGenerator(java.lang.String strategy, Type type, java.util.Properties config)
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 java.lang.Class getIdentifierGeneratorClass(java.lang.String strategy)
IdentifierGenerator
for the given strategy.getIdentifierGeneratorClass
in interface IdentifierGeneratorFactory
strategy
- The strategyCopyright © 2014. All Rights Reserved.