public class

DefaultIdentifierGeneratorFactory

extends Object
implements Serializable IdentifierGeneratorFactory
java.lang.Object
   ↳ org.hibernate.id.factory.DefaultIdentifierGeneratorFactory

Class Overview

Basic templated support for IdentifierGeneratorFactory implementations.

Summary

Public Constructors
DefaultIdentifierGeneratorFactory()
Constructs a new DefaultIdentifierGeneratorFactory.
Public Methods
IdentifierGenerator createIdentifierGenerator(String strategy, Type type, Properties config)
Given a strategy, retrieve the appropriate identifier generator instance.
Class getIdentifierGeneratorClass(String strategy)
Retrieve the class that will be used as the IdentifierGenerator for the given strategy.
void register(String strategy, Class generatorClass)
void setDialect(Dialect dialect)
Allow injection of the dialect to use.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.hibernate.id.factory.IdentifierGeneratorFactory

Public Constructors

public DefaultIdentifierGeneratorFactory ()

Constructs a new DefaultIdentifierGeneratorFactory.

Public Methods

public IdentifierGenerator createIdentifierGenerator (String strategy, Type type, Properties config)

Given a strategy, retrieve the appropriate identifier generator instance.

Parameters
strategy The generation strategy.
type The mapping type for the identifier values.
config Any configuraion properties given in the generator mapping.
Returns
  • The appropriate generator instance.

public Class getIdentifierGeneratorClass (String strategy)

Retrieve the class that will be used as the IdentifierGenerator for the given strategy.

Parameters
strategy The strategy
Returns
  • The generator class.

public void register (String strategy, Class generatorClass)

public void setDialect (Dialect dialect)

Allow injection of the dialect to use.

Parameters
dialect The dialect