Interface GroupParent

All Known Implementing Classes:
GroupParentProvider

public sealed interface GroupParent permits GroupParentProvider
Group parent interface to manage group parents.
  • Method Summary

    Modifier and Type
    Method
    Description
    addExpiredTime(int groupId, int parentId, long time)
    Adds time to the parent expiration.
    void
    addParent(int groupId, int creatorId, int parentId, long time)
    Adds a parent to a group.
    void
    clearParent(int groupId)
    Clears all parents from a group.
    boolean
    existsParent(int groupId, int parentId)
    Checks if a parent exists.
    getCreatedDate(int groupId, int parentId)
    Obtains the date the parent was created.
    long
    getCreatedTime(int groupId, int parentId)
    Obtains the time the parent was created.
    int
    getCreatorId(int groupId, int parentId)
    Obtains the creator id of a parent.
    getExpiredDate(int groupId, int parentId)
    Obtains the date the parent will expire.
    long
    getExpiredTime(int groupId, int parentId)
    Obtains the time the parent will expire.
    getParentIds(int groupId)
    Obtains all parent ids of a group.
    getParentNames(Group group, int groupId)
    Obtains all parent names of a group.
    void
    Loads all expired parents of a group.
    removeExpiredTime(int groupId, int parentId, long time)
    Removes time from the parent expiration.
    void
    removeParent(int groupId, int parentId)
    Removes a parent from a group.
    setExpiredTime(int groupId, int parentId, long time)
    Sets the time the parent will expire.
  • Method Details

    • existsParent

      boolean existsParent(int groupId, int parentId)
      Checks if a parent exists.
      Parameters:
      groupId - The id of the group.
      parentId - The id of the parent.
      Returns:
      True if the parent exists, otherwise false.
    • addParent

      void addParent(int groupId, int creatorId, int parentId, long time)
      Adds a parent to a group.
      Parameters:
      groupId - The id of the group.
      creatorId - The id of the creator.
      parentId - The id of the parent.
      time - The time the parent was added.
    • removeParent

      void removeParent(int groupId, int parentId)
      Removes a parent from a group.
      Parameters:
      groupId - The id of the group.
      parentId - The id of the parent.
    • clearParent

      void clearParent(int groupId)
      Clears all parents from a group.
      Parameters:
      groupId - The id of the group.
    • getParentIds

      List<Integer> getParentIds(int groupId)
      Obtains all parent ids of a group.
      Parameters:
      groupId - The id of the group.
      Returns:
      A list of all parent ids of the group.
    • getParentNames

      List<String> getParentNames(Group group, int groupId)
      Obtains all parent names of a group.
      Parameters:
      group - The group.
      groupId - The id of the group.
      Returns:
      A list of all parent names of the group.
    • getCreatorId

      int getCreatorId(int groupId, int parentId)
      Obtains the creator id of a parent.
      Parameters:
      groupId - The id of the group.
      parentId - The id of the parent.
      Returns:
      The creator id of the parent.
    • getCreatedTime

      long getCreatedTime(int groupId, int parentId)
      Obtains the time the parent was created.
      Parameters:
      groupId - The id of the group.
      parentId - The id of the parent.
      Returns:
      The time the parent was created.
    • getCreatedDate

      String getCreatedDate(int groupId, int parentId)
      Obtains the date the parent was created.
      Parameters:
      groupId - The id of the group.
      parentId - The id of the parent.
      Returns:
      The date the parent was created.
    • getExpiredTime

      long getExpiredTime(int groupId, int parentId)
      Obtains the time the parent will expire.
      Parameters:
      groupId - The id of the group.
      parentId - The id of the parent.
      Returns:
      The time the parent will expire.
    • getExpiredDate

      String getExpiredDate(int groupId, int parentId)
      Obtains the date the parent will expire.
      Parameters:
      groupId - The id of the group.
      parentId - The id of the parent.
      Returns:
      The date the parent will expire.
    • setExpiredTime

      String setExpiredTime(int groupId, int parentId, long time)
      Sets the time the parent will expire.
      Parameters:
      groupId - The id of the group.
      parentId - The id of the parent.
      time - The time the parent will expire.
      Returns:
      The date the parent will expire.
    • addExpiredTime

      String addExpiredTime(int groupId, int parentId, long time)
      Adds time to the parent expiration.
      Parameters:
      groupId - The id of the group.
      parentId - The id of the parent.
      time - The time to add to the expiration.
      Returns:
      The date the parent will expire.
    • removeExpiredTime

      String removeExpiredTime(int groupId, int parentId, long time)
      Removes time from the parent expiration.
      Parameters:
      groupId - The id of the group.
      parentId - The id of the parent.
      time - The time to remove from the expiration.
      Returns:
      The date the parent will expire.
    • loadExpired

      void loadExpired(Group group)
      Loads all expired parents of a group.
      Parameters:
      group - The group.