Package de.murmelmeister.murmelapi.time
Class QuitLoggerProvider
java.lang.Object
de.murmelmeister.murmelapi.time.QuitLoggerProvider
- All Implemented Interfaces:
QuitLogger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcreateQuitDate(int userId) Logs the quit date for a user identified by the given userId.voiddeleteUser(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.longgetQuitTime(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.
-
Constructor Details
-
QuitLoggerProvider
public QuitLoggerProvider()
-
-
Method Details
-
createQuitDate
public int createQuitDate(int userId) Description copied from interface:QuitLoggerLogs the quit date for a user identified by the given userId.- Specified by:
createQuitDatein interfaceQuitLogger- Parameters:
userId- The ID of the user whose quit date is to be recorded
-
deleteUser
public void deleteUser(int userId) Description copied from interface:QuitLoggerDeletes the user identified by the given userId from the system.- Specified by:
deleteUserin interfaceQuitLogger- Parameters:
userId- The ID of the user to be deleted.
-
getTimeIds
Description copied from interface:QuitLoggerRetrieves a list of time IDs associated with a specific user.- Specified by:
getTimeIdsin interfaceQuitLogger- 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:QuitLoggerRetrieves the quit time for a user identified by the given userId and timeId.- Specified by:
getQuitTimein interfaceQuitLogger- 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
Description copied from interface:QuitLoggerRetrieves the quit date for a user identified by the given userId and timeId.- Specified by:
getQuitDatein interfaceQuitLogger- 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.
-