Class QuitLoggerProvider

java.lang.Object
de.murmelmeister.murmelapi.time.QuitLoggerProvider
All Implemented Interfaces:
QuitLogger

public final class QuitLoggerProvider extends Object implements QuitLogger
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    createQuitDate(int userId)
    Logs the quit date for a user identified by the given userId.
    void
    deleteUser(int userId)
    Deletes the user identified by the given userId from the system.
    getQuitDate(int timeId, int userId)
    Retrieves the quit date for a user identified by the given userId and timeId.
    long
    getQuitTime(int timeId, int userId)
    Retrieves the quit time for a user identified by the given userId and timeId.
    getTimeIds(int userId)
    Retrieves a list of time IDs associated with a specific user.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • QuitLoggerProvider

      public QuitLoggerProvider()
  • Method Details

    • createQuitDate

      public int createQuitDate(int userId)
      Description copied from interface: QuitLogger
      Logs the quit date for a user identified by the given userId.
      Specified by:
      createQuitDate in interface QuitLogger
      Parameters:
      userId - The ID of the user whose quit date is to be recorded
    • deleteUser

      public void deleteUser(int userId)
      Description copied from interface: QuitLogger
      Deletes the user identified by the given userId from the system.
      Specified by:
      deleteUser in interface QuitLogger
      Parameters:
      userId - The ID of the user to be deleted.
    • getTimeIds

      public List<Integer> getTimeIds(int userId)
      Description copied from interface: QuitLogger
      Retrieves a list of time IDs associated with a specific user.
      Specified by:
      getTimeIds in interface QuitLogger
      Parameters:
      userId - The ID of the user whose time IDs are to be retrieved.
      Returns:
      A list of time IDs associated with the given user ID.
    • getQuitTime

      public long getQuitTime(int timeId, int userId)
      Description copied from interface: QuitLogger
      Retrieves the quit time for a user identified by the given userId and timeId.
      Specified by:
      getQuitTime in interface QuitLogger
      Parameters:
      timeId - The ID of the time record.
      userId - The ID of the user whose quit time is being retrieved.
      Returns:
      The quit time in milliseconds since epoch for the specified user and timeId.
    • getQuitDate

      public String getQuitDate(int timeId, int userId)
      Description copied from interface: QuitLogger
      Retrieves the quit date for a user identified by the given userId and timeId.
      Specified by:
      getQuitDate in interface QuitLogger
      Parameters:
      timeId - The ID of the time record.
      userId - The ID of the user whose quit date is being retrieved.
      Returns:
      The formatted quit date string for the specified user and timeId.