StandardRandomStrategy (Hibernate JavaDocs)
Date: 2012-04-05

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

Field Summary
`static StandardRandomStrategy` | `INSTANCE`

Constructor Summary
`StandardRandomStrategy()`

Method Summary
`UUID` | `generateUUID(SessionImplementor session)` Delegates to `UUID.randomUUID()`
`int` | `getGeneratedVersion()` A variant 4 (random) strategy

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### INSTANCE

    public static final StandardRandomStrategy INSTANCE

Constructor Detail

### StandardRandomStrategy

    public StandardRandomStrategy()

Method Detail

### 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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.