org.hibernate.id.uuid
Class StandardRandomStrategy
java.lang.Object
org.hibernate.id.uuid.StandardRandomStrategy
- All Implemented Interfaces:
- Serializable, UUIDGenerationStrategy
public class StandardRandomStrategy
- extends Object
- implements UUIDGenerationStrategy
Implements a "random" UUID generation strategy as defined by the UUID.randomUUID()
method.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final StandardRandomStrategy INSTANCE
StandardRandomStrategy
public StandardRandomStrategy()
getGeneratedVersion
public int getGeneratedVersion()
- A variant 4 (random) strategy
- Specified by:
getGeneratedVersion
in interface UUIDGenerationStrategy
- Returns:
- The supported generation version
generateUUID
public UUID generateUUID(SessionImplementor session)
- Delegates to
UUID.randomUUID()
- Specified by:
generateUUID
in interface UUIDGenerationStrategy
- Parameters:
session
- The session asking for the generation
- Returns:
- The generated UUID.
Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.