Class IdGeneratorImpl
java.lang.Object
com.brodygaudel.bank.common.util.implementation.IdGeneratorImpl
- All Implemented Interfaces:
IdGenerator
Implementation of the
IdGenerator
interface that generates unique IDs
based on the current date, time, and a counter. The counter is reset to 0 every hour.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGenerates a unique ID based on the current date, time, and a counter.
-
Constructor Details
-
IdGeneratorImpl
public IdGeneratorImpl()
-
-
Method Details
-
autoGenerate
Generates a unique ID based on the current date, time, and a counter.- Specified by:
autoGenerate
in interfaceIdGenerator
- Returns:
- A unique ID.
-