Package org.hibernate.id
Interface UUIDGenerationStrategy
-
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
CustomVersionOneStrategy
,StandardRandomStrategy
@Deprecated(since="6.0") public interface UUIDGenerationStrategy extends Serializable
Deprecated.seeUUIDGenerator
A strategy for generating a variant 2UUID
value.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description UUID
generateUUID(SharedSessionContractImplementor session)
Deprecated.Generate the UUID.int
getGeneratedVersion()
Deprecated.Which variant, according to IETF RFC 4122, of UUID does this strategy generate? RFC 4122 defines 5 variants (though it only describes algorithms to generate 4): 1 = time based 2 = DCE based using POSIX UIDs 3 = name based (md5 hash) 4 = random numbers based 5 = name based (sha-1 hash)
-
-
-
Method Detail
-
getGeneratedVersion
int getGeneratedVersion()
Deprecated.Which variant, according to IETF RFC 4122, of UUID does this strategy generate? RFC 4122 defines 5 variants (though it only describes algorithms to generate 4):- 1 = time based
- 2 = DCE based using POSIX UIDs
- 3 = name based (md5 hash)
- 4 = random numbers based
- 5 = name based (sha-1 hash)
Returning the values above should be reserved to those generators creating variants compliant with the corresponding RFC definition; others can feel free to return other values as they see fit.
Informational only, and not used at this time.
- Returns:
- The supported generation version
-
generateUUID
UUID generateUUID(SharedSessionContractImplementor session)
Deprecated.Generate the UUID.- Parameters:
session
- The session asking for the generation- Returns:
- The generated UUID.
-
-