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

public Class StandardRandomStrategy

extends Object
implements UUIDGenerationStrategy, ValueGenerator
Class Inheritance
All Implemented Interfaces
org.hibernate.id.uuid.UuidGenerator.ValueGenerator, org.hibernate.id.UUIDGenerationStrategy, java.io.Serializable
Imports
java.util.UUID, org.hibernate.engine.spi.SharedSessionContractImplementor, org.hibernate.id.UUIDGenerationStrategy

Deprecated

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

Implements a "random" UUID generation strategy as defined by the UUID#randomUUID() method.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
public static final StandardRandomStrategy
INSTANCE

Deprecated as a consequence of StandardRandomStrategy being deprecated.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public UUID
public UUID
public int
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final StandardRandomStrategy INSTANCE

Deprecated

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

Constructor Detail

StandardRandomStrategyback to summary
public StandardRandomStrategy()

Method Detail

generateUUIDback to summary
public UUID generateUUID(SharedSessionContractImplementor session)

Implements org.hibernate.id.UUIDGenerationStrategy.generateUUID.

Delegates to UUID#randomUUID()

Parameters
session:SharedSessionContractImplementor

Doc from org.hibernate.id.UUIDGenerationStrategy.generateUUID.

The session asking for the generation

Returns:UUID

Doc from org.hibernate.id.UUIDGenerationStrategy.generateUUID.

The generated UUID.

Annotations
@Override
generateUuidback to summary
public UUID generateUuid(SharedSessionContractImplementor session)

Implements org.hibernate.id.uuid.UuidGenerator.ValueGenerator.generateUuid.

Annotations
@Override
getGeneratedVersionback to summary
public int getGeneratedVersion()

Implements org.hibernate.id.UUIDGenerationStrategy.getGeneratedVersion.

A variant 4 (random) strategy

Returns:int

Doc from org.hibernate.id.UUIDGenerationStrategy.getGeneratedVersion.

The supported generation version

Annotations
@Override