Top Description Fields Constructors Methods
org.hibernate.id.enhanced

public Class OptimizerFactory

extends Object
Class Inheritance
Imports
java.lang.reflect.Constructor, java.util.Properties, org.hibernate.cfg.AvailableSettings, org.hibernate.internal.CoreMessageLogger, org.jboss.logging.Logger

Factory for Optimizer instances.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private static final Class<?>[]
private static final CoreMessageLogger

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static Optimizer
buildFallbackOptimizer(Class<?> returnClass, int incrementSize)

private static Optimizer
buildOptimizer(OptimizerDescriptor descriptor, Class<?> returnClass, int incrementSize)

public static Optimizer

Returns:

The built optimizer
buildOptimizer
(OptimizerDescriptor
The optimizer type, either a shorthand name or the Optimizer class name.
type
,
Class<?>
The generated value java type
returnClass
,
int
The increment size.
incrementSize
,
long
The user supplied initial-value (-1 indicates the user did not specify).
explicitInitialValue
)

Builds an optimizer

public static String
determineImplicitOptimizerName(int incrementSize, Properties configSettings)

Determine the optimizer to use when there was not one explicitly specified.

public static boolean

Returns:

true indicates the optimizer is a pooled strategy.
isPooledOptimizer
(String
The name of the optimizer
optimizerName
)

Deprecated since 6.3. No longer used
Does the given optimizer name represent a pooled strategy?
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CTOR_SIGback to summary
private static final Class<?>[] CTOR_SIG
LOGback to summary
private static final CoreMessageLogger LOG

Constructor Detail

OptimizerFactoryback to summary
private OptimizerFactory()

Method Detail

buildFallbackOptimizerback to summary
private static Optimizer buildFallbackOptimizer(Class<?> returnClass, int incrementSize)
buildOptimizerback to summary
private static Optimizer buildOptimizer(OptimizerDescriptor descriptor, Class<?> returnClass, int incrementSize)
buildOptimizerback to summary
public static Optimizer buildOptimizer(OptimizerDescriptor type, Class<?> returnClass, int incrementSize, long explicitInitialValue)

Builds an optimizer

Parameters
type:OptimizerDescriptor

The optimizer type, either a shorthand name or the Optimizer class name.

returnClass:Class<?>

The generated value java type

incrementSize:int

The increment size.

explicitInitialValue:long

The user supplied initial-value (-1 indicates the user did not specify).

Returns:Optimizer

The built optimizer

determineImplicitOptimizerNameback to summary
public static String determineImplicitOptimizerName(int incrementSize, Properties configSettings)

Determine the optimizer to use when there was not one explicitly specified.

isPooledOptimizerback to summary
public static boolean isPooledOptimizer(String optimizerName)

Deprecated

since 6.3.

No longer used

Does the given optimizer name represent a pooled strategy?

Parameters
optimizerName:String

The name of the optimizer

Returns:boolean

true indicates the optimizer is a pooled strategy.

Annotations
@Deprecated
since:6.3