public class UUIDHexGenerator extends AbstractUUIDGenerator implements Configurable
<b>uuid</b><br> <br> A <tt>UUIDGenerator</tt> 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. <p/> Mapping parameters supported: separator.
ENTITY_NAME, GENERATOR_NAME, JPA_ENTITY_NAME
Constructor and Description |
---|
UUIDHexGenerator() |
Modifier and Type | Method and Description |
---|---|
void |
configure(Type type,
Properties params,
ServiceRegistry serviceRegistry)
Configure this instance, given the value of parameters
specified by the user as <tt><param></tt> elements.
|
protected String |
format(int intValue) |
protected String |
format(short shortValue) |
Serializable |
generate(SharedSessionContractImplementor session,
Object obj)
Generate a new identifier.
|
public void configure(Type type, Properties params, ServiceRegistry serviceRegistry) throws MappingException
Configurable
Configure this instance, given the value of parameters specified by the user as <tt><param></tt> elements. This method is called just once, following instantiation.
configure
in interface Configurable
type
- The id property type descriptorparams
- param values, keyed by parameter nameserviceRegistry
- Access to service that may be needed.MappingException
public Serializable generate(SharedSessionContractImplementor session, Object obj)
IdentifierGenerator
Generate a new identifier.
generate
in interface IdentifierGenerator
session
- The session from which the request originatesobj
- the entity or collection (idbag) for which the id is being generatedprotected String format(int intValue)
protected String format(short shortValue)
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.