Top Description Fields Constructors Methods
org.hibernate.id

public Class UUIDHexGenerator

extends AbstractUUIDGenerator
Class Inheritance
Imports
java.io.Serializable, java.util.Properties, org.hibernate.MappingException, org.hibernate.engine.spi.SharedSessionContractImplementor, org.hibernate.internal.CoreLogging, .CoreMessageLogger, org.hibernate.internal.util.config.ConfigurationHelper, org.hibernate.service.ServiceRegistry, org.hibernate.type.Type

Deprecated

as a consequence of AbstractUUIDGenerator being deprecated. See corresponding docs for further information.

uuid

A UUIDGenerator that returns a string of length 32, This string will consist of only hex digits. Optionally, the string may be generated with separators between each component of the UUID.

Mapping parameters supported: separator.

Author
Gavin King

Field Summary

Modifier and TypeField and Description
private static final CoreMessageLogger
private String
private static boolean

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 default org.hibernate.id.IdentifierGenerator.configure.

Configure this instance, given the value of parameters specified by the user as <param> elements.
protected String
format(int intValue)

protected String
format(short shortValue)

public Serializable
generate(SharedSessionContractImplementor
The session from which the request originates
session
,
Object
the entity or collection (idbag) for which the id is being generated
obj
)

Implements org.hibernate.id.IdentifierGenerator.generate.

Generate a new identifier.
Inherited from org.hibernate.id.AbstractUUIDGenerator:
getCountgetHiTimegetIPgetJVMgetLoTime

Field Detail

LOGback to summary
private static final CoreMessageLogger LOG
sepback to summary
private String sep
WARNEDback to summary
private static boolean WARNED

Constructor Detail

UUIDHexGeneratorback to summary
public UUIDHexGenerator()

Method Detail

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

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.
formatback to summary
protected String format(int intValue)
formatback to summary
protected String format(short shortValue)
generateback to summary
public Serializable generate(SharedSessionContractImplementor session, Object obj)

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