org.hibernate.id.uuid
Class StandardRandomStrategy
java.lang.Object
   org.hibernate.id.uuid.StandardRandomStrategy
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.
- Author:
- Steve Ebersole
- 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:
- getGeneratedVersionin interface- UUIDGenerationStrategy
 
- 
- Returns:
- The supported generation version
 
generateUUID
public UUID generateUUID(SessionImplementor session)
- Delegates to UUID.randomUUID()
 
- 
- Specified by:
- generateUUIDin interface- UUIDGenerationStrategy
 
- 
- Parameters:
- session- The session asking for the generation
- Returns:
- The generated UUID.
 
Copyright © 2001-2010 Red Hat, Inc.  All Rights Reserved.