Top Description Fields Constructors Methods
org.hibernate.id

public Class SequenceHiLoGenerator

extends SequenceGenerator
Class Inheritance
Annotations
@Deprecated
Imports
java.io.Serializable, java.util.Properties, org.hibernate.MappingException, org.hibernate.engine.spi.SharedSessionContractImplementor, org.hibernate.id.enhanced.AccessCallback, .LegacyHiLoAlgorithmOptimizer, org.hibernate.internal.util.config.ConfigurationHelper, org.hibernate.service.ServiceRegistry, org.hibernate.type.Type

Deprecated

See deprecation discussion on SequenceGenerator

seqhilo

An IdentifierGenerator that combines a hi/lo algorithm with an underlying oracle-style sequence that generates hi values. The user may specify a maximum lo value to determine how often new hi values are fetched.

Mapping parameters supported: sequence, max_lo, parameters.
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private LegacyHiLoAlgorithmOptimizer
public static final String
private int
Inherited from org.hibernate.id.SequenceGenerator:
PARAMETERSSEQUENCE

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
configure(Type
The id property type descriptor
type
,
Properties
param values, keyed by parameter name
params
,
ServiceRegistry
Access to service that may be needed.
serviceRegistry
)

Overrides org.hibernate.id.SequenceGenerator.configure.

Overrides default org.hibernate.id.IdentifierGenerator.configure.

Configure this instance, given the value of parameters specified by the user as <param> elements.
public synchronized Serializable
generate(final SharedSessionContractImplementor
The session from which the request originates
session
,
Object
the entity or collection (idbag) for which the id is being generated
obj
)

Overrides org.hibernate.id.SequenceGenerator.generate.

Implements org.hibernate.id.IdentifierGenerator.generate.

Generate a new identifier.
pack-priv LegacyHiLoAlgorithmOptimizer

Returns:

The optimizer
getHiloOptimizer
()

For testing/assertion purposes

Inherited from org.hibernate.id.SequenceGenerator:
buildHolderdetermineBulkInsertionIdentifierGenerationSelectFragmentgenerateHoldergeneratorKeygetAllSqlForTestsgetIdentifierTypegetPhysicalSequenceNamegetSequenceNameinitializeregisterExportablessupportsBulkInsertionIdentifierGeneration

Field Detail

hiloOptimizerback to summary
private LegacyHiLoAlgorithmOptimizer hiloOptimizer
MAX_LOback to summary
public static final String MAX_LO
maxLoback to summary
private int maxLo

Constructor Detail

SequenceHiLoGeneratorback to summary
public SequenceHiLoGenerator()

Method Detail

configureback to summary
public void configure(Type type, Properties params, ServiceRegistry serviceRegistry) throws MappingException

Overrides org.hibernate.id.SequenceGenerator.configure.

Overrides default org.hibernate.id.IdentifierGenerator.configure.

Doc from org.hibernate.id.IdentifierGenerator.configure.

Configure this instance, given the value of parameters specified by the user as <param> elements.

This method is called just once, following instantiation, and before registerExportables(Database).

Parameters
type:Type

The id property type descriptor

params:Properties

param values, keyed by parameter name

serviceRegistry:ServiceRegistry

Access to service that may be needed.

Annotations
@Override
Exceptions
MappingException:
If configuration fails.
generateback to summary
public synchronized Serializable generate(final SharedSessionContractImplementor session, Object obj)

Overrides org.hibernate.id.SequenceGenerator.generate.

Implements org.hibernate.id.IdentifierGenerator.generate.

Doc from org.hibernate.id.IdentifierGenerator.generate.

Generate a new identifier.

Parameters
session:SharedSessionContractImplementor

The session from which the request originates

obj:Object

the entity or collection (idbag) for which the id is being generated

Returns:Serializable

a new identifier

Annotations
@Override
getHiloOptimizerback to summary
pack-priv LegacyHiLoAlgorithmOptimizer getHiloOptimizer()

For testing/assertion purposes

Returns:LegacyHiLoAlgorithmOptimizer

The optimizer