Top Description Methods
org.hibernate.id.factory

public Interface IdentifierGeneratorFactory

Known Direct Implementers
org.hibernate.id.factory.DefaultIdentifierGeneratorFactory
Imports
java.util.Properties, java.io.Serializable, org.hibernate.id.IdentifierGenerator, org.hibernate.type.Type, org.hibernate.dialect.Dialect

Contract for a factory of IdentifierGenerator instances.
Author
Steve Ebersole

Method Summary

Modifier and TypeMethod and Description
public IdentifierGenerator

Returns:

The appropriate generator instance.
createIdentifierGenerator
(String
The generation strategy.
strategy
,
Type
The mapping type for the identifier values.
type
,
Properties
Any configuraion properties given in the generator mapping.
config
)

Given a strategy, retrieve the appropriate identifier generator instance.

public Class<T>

Returns:

The generator class.
getIdentifierGeneratorClass
(String
The strategy
strategy
)

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

public void
setDialect(Dialect
The dialect
dialect
)

Deprecated The intention is that Dialect should be required to be specified up-front and it would then get ctor injected.
Allow injection of the dialect to use.

Method Detail

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

Given a strategy, retrieve the appropriate identifier generator instance.

Parameters
strategy:String

The generation strategy.

type:Type

The mapping type for the identifier values.

config:Properties

Any configuraion properties given in the generator mapping.

Returns:IdentifierGenerator

The appropriate generator instance.

getIdentifierGeneratorClassback to summary
public Class<T> getIdentifierGeneratorClass(String strategy)

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

Parameters
strategy:String

The strategy

Returns:Class<T>

The generator class.

setDialectback to summary
public void setDialect(Dialect dialect)

Deprecated

The intention is that Dialect should be required to be specified up-front and it would then get ctor injected.

Allow injection of the dialect to use.

Parameters
dialect:Dialect

The dialect