Interface UserParent
- All Known Implementing Classes:
UserParentProvider
User parent interface to manage user parents.
-
Method Summary
Modifier and TypeMethodDescriptionaddExpiredTime(int userId, int parentId, long time) Adds an expired time to a parent.voidaddParent(int userId, int creatorId, int parentId, long time) Adds a parent to a user.voidclearParent(int userId) Clears all parents from a user.booleanexistsParent(int userId, int parentId) Checks if a parent exists.getCreatedDate(int userId, int parentId) Obtains the created date of a parent.longgetCreatedTime(int userId, int parentId) Obtains the created time of a parent.intgetCreatorId(int userId, int parentId) Obtains the creator id of a parent.getExpiredDate(int userId, int parentId) Obtains the expired date of a parent.longgetExpiredTime(int userId, int parentId) Obtains the expired time of a parent.intgetParentId(int userId) Obtains the parent id of a user.getParentIds(int userId) Obtains all parent ids of a user.getParentNames(Group group, int userId) Obtains all parent names of a user.voidloadExpired(User user) Loads all expired parents of a user.removeExpiredTime(int userId, int parentId, long time) Removes an expired time from a parent.voidremoveParent(int userId, int parentId) Removes a parent from a user.setExpiredTime(int userId, int parentId, long time) Sets the expired time of a parent.
-
Method Details
-
existsParent
boolean existsParent(int userId, int parentId) Checks if a parent exists.- Parameters:
userId- The id of the user.parentId- The id of the parent.- Returns:
- True if the parent exists, otherwise false.
-
addParent
void addParent(int userId, int creatorId, int parentId, long time) Adds a parent to a user.- Parameters:
userId- The id of the user.creatorId- The id of the creator.parentId- The id of the parent.time- The time the parent was added.
-
removeParent
void removeParent(int userId, int parentId) Removes a parent from a user.- Parameters:
userId- The id of the user.parentId- The id of the parent.
-
clearParent
void clearParent(int userId) Clears all parents from a user.- Parameters:
userId- The id of the user.
-
getParentId
int getParentId(int userId) Obtains the parent id of a user.- Parameters:
userId- The id of the user.- Returns:
- The parent id of the user.
-
getParentIds
Obtains all parent ids of a user.- Parameters:
userId- The id of the user.- Returns:
- A list of all parent ids of the user.
-
getParentNames
Obtains all parent names of a user.- Parameters:
group- The group.userId- The id of the user.- Returns:
- A list of all parent names of the user.
-
getCreatorId
int getCreatorId(int userId, int parentId) Obtains the creator id of a parent.- Parameters:
userId- The id of the user.parentId- The id of the parent.- Returns:
- The creator id of the parent.
-
getCreatedTime
long getCreatedTime(int userId, int parentId) Obtains the created time of a parent.- Parameters:
userId- The id of the user.parentId- The id of the parent.- Returns:
- The created time of the parent.
-
getCreatedDate
Obtains the created date of a parent.- Parameters:
userId- The id of the user.parentId- The id of the parent.- Returns:
- The created date of the parent.
-
getExpiredTime
long getExpiredTime(int userId, int parentId) Obtains the expired time of a parent.- Parameters:
userId- The id of the user.parentId- The id of the parent.- Returns:
- The expired time of the parent.
-
getExpiredDate
Obtains the expired date of a parent.- Parameters:
userId- The id of the user.parentId- The id of the parent.- Returns:
- The expired date of the parent.
-
setExpiredTime
Sets the expired time of a parent.- Parameters:
userId- The id of the user.parentId- The id of the parent.time- The time the parent expires.- Returns:
- The date the parent will expire.
-
addExpiredTime
Adds an expired time to a parent.- Parameters:
userId- The id of the user.parentId- The id of the parent.time- The time to add to the expired time.- Returns:
- The date the parent will expire.
-
removeExpiredTime
Removes an expired time from a parent.- Parameters:
userId- The id of the user.parentId- The id of the parent.time- The time to remove from the expired time.- Returns:
- The date the parent will expire.
-
loadExpired
Loads all expired parents of a user.- Parameters:
user- The user.
-