|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.arch4j.persistence.domainmapper.JugRandomBasedUuidGenerator
This class implements the IdentifierGenerator
interface
to provide a random-based UUID generator.
The actual implementation is delegated to a third-party library,
the open-source Java UUID Generator (JUG).
The returned UUID string is 36 characters long; for example,
c383402e-98a8-4535-8b80-3a0216d78f80
Subclasses are free to extend this class and override the method
getSecureRandomNumberGenerator()
, which provides a SecureRandom
number generator for the JUG implementation.
Constructor Summary | |
JugRandomBasedUuidGenerator()
|
Method Summary | |
Serializable |
generate()
Generate a new unique identifier. |
protected SecureRandom |
getSecureRandomNumberGenerator()
Returns a SecureRandom number generator that is used to seed the JUG implementation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JugRandomBasedUuidGenerator()
Method Detail |
public Serializable generate()
generate
in interface IdentifierGenerator
Serializable
unique identifier.protected SecureRandom getSecureRandomNumberGenerator()
SecureRandom
number generator that is used to seed the JUG implementation.
This method can be overridden in subclasses to provide their own number generator.
Defaults to the number generator JUG uses.
SecureRandom
, cryptographically strong pseudo-random number generator (PRNG).
|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |