Interface UserSettings
- All Known Implementing Classes:
UserSettingsProvider
User settings interface to manage user settings.
-
Method Summary
Modifier and TypeMethodDescriptionvoidcreateUser(int id) Creates a new user and checks if the user already exists.voiddeleteUser(int id) Deletes a user.booleanexistsUser(int id) Checks if a user exists.getFirstJoinDate(int id) Obtains the first join date of a user.longgetFirstJoinTime(int id) Obtains the first join time of a user.getLastQuitDate(int id) Retrieves the last quit date of a user identified by the given ID.longgetLastQuitTime(int id) Retrieves the last quit time of a user.intgetOnline(int id) Retrieves the online status of a user identified by the given ID.voidsetLastQuitTime(int id, long time) Sets the last quit time for a user identified by the given ID.voidsetOnline(int id, int online) Sets the online status of a user identified by the given ID.
-
Method Details
-
existsUser
boolean existsUser(int id) Checks if a user exists.- Parameters:
id- The id of the user.- Returns:
- True if the user exists, otherwise false.
-
createUser
void createUser(int id) Creates a new user and checks if the user already exists. If the user already exists, the method will return without creating a new user.- Parameters:
id- The id of the user.
-
deleteUser
void deleteUser(int id) Deletes a user.- Parameters:
id- The id of the user.
-
getFirstJoinTime
long getFirstJoinTime(int id) Obtains the first join time of a user.- Parameters:
id- The id of the user.- Returns:
- The first join time of the user.
-
getFirstJoinDate
Obtains the first join date of a user.- Parameters:
id- The id of the user.- Returns:
- The first join date of the user.
-
setLastQuitTime
void setLastQuitTime(int id, long time) Sets the last quit time for a user identified by the given ID. This method updates the last quit time of the user in the user settings database.- Parameters:
id- The ID of the user.time- The last quit time to set for the user, represented as a long value.
-
getLastQuitTime
long getLastQuitTime(int id) Retrieves the last quit time of a user.- Parameters:
id- The id of the user.- Returns:
- The last quit time of the user as a long value.
-
getLastQuitDate
Retrieves the last quit date of a user identified by the given ID.- Parameters:
id- The ID of the user.- Returns:
- The last quit date of the user as a string.
-
setOnline
void setOnline(int id, int online) Sets the online status of a user identified by the given ID. This method updates the online status of the user in the user settings database.- Parameters:
id- The ID of the user.online- The online status to set for the user, represented as a byte value.
-
getOnline
int getOnline(int id) Retrieves the online status of a user identified by the given ID. This method retrieves the online status of the user from the user settings database.- Parameters:
id- The ID of the user.- Returns:
- The online status of the user as a boolean value. True indicates that the user is online, false indicates that the user is offline.
-