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

public Class StandardRandomStrategy

extends Object
implements UUIDGenerationStrategy
Class Inheritance
All Implemented Interfaces
org.hibernate.id.UUIDGenerationStrategy, java.io.Serializable
Imports
java.util.UUID, org.hibernate.engine.SessionImplementor, org.hibernate.id.UUIDGenerationStrategy

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

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public UUID
generateUUID(SessionImplementor
The session asking for the generation
session
)

Implements org.hibernate.id.UUIDGenerationStrategy.generateUUID.

Delegates to UUID#randomUUID()
public int
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
public static final StandardRandomStrategy INSTANCE

Constructor Detail

StandardRandomStrategyback to summary
public StandardRandomStrategy()

Method Detail

generateUUIDback to summary
public UUID generateUUID(SessionImplementor session)

Implements org.hibernate.id.UUIDGenerationStrategy.generateUUID.

Delegates to UUID#randomUUID()

Parameters
session:SessionImplementor

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.

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