|
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.JugTimeBasedUuidGenerator
This class implements the IdentifierGenerator
interface
to provide a time-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
A property named identifier.generator.ethernet.address is consulted to get the ethernet address to use in the generator. It should be specified as a standard MAC address string (like 00:B0:D0:56:E9:30). If the property is not found, a randomly-generated dummy ethernet address is used by the JUG library.
Constructor Summary | |
JugTimeBasedUuidGenerator()
|
Method Summary | |
Serializable |
generate()
Generate a new unique identifier. |
protected org.doomdark.uuid.UUID |
getUUID()
Try to get an ethernet address from the property file to pass to JUG. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JugTimeBasedUuidGenerator()
Method Detail |
public Serializable generate()
generate
in interface IdentifierGenerator
Serializable
unique identifier.protected org.doomdark.uuid.UUID getUUID()
EnvironmentalException
- if there is any problem creating an ethernet address from the property.
|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |