Class IdGeneratorImpl

java.lang.Object
com.brodygaudel.bank.common.util.implementation.IdGeneratorImpl
All Implemented Interfaces:
IdGenerator

@Service public class IdGeneratorImpl extends Object implements 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 Details

    • IdGeneratorImpl

      public IdGeneratorImpl()
  • Method Details

    • autoGenerate

      public String autoGenerate()
      Generates a unique ID based on the current date, time, and a counter.
      Specified by:
      autoGenerate in interface IdGenerator
      Returns:
      A unique ID.