Interface Group

All Known Implementing Classes:
GroupProvider

public sealed interface Group permits GroupProvider
Group interface to manage groups.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Creates a default group with the specified name.
    void
    createNewGroup(String groupName, int createdBy, int priority, String teamId)
    Creates a new group with the specified details.
    void
    deleteGroup(int executorId, int groupId)
    Deletes a group with the specified group ID.
    boolean
    existsGroup(int groupId)
    Checks if a group with the specified group ID exists.
    boolean
    existsGroup(String groupName)
    Checks if a group with the specified group name exists.
    Retrieves the color information associated with a group.
    getCreatedAt(int groupId)
    Retrieves the creation timestamp of the group specified by its unique ID.
    int
    getCreatedBy(int groupId)
    Retrieves the unique identifier of the user who created the specified group.
    getModifiedAt(int groupId)
    Retrieves the timestamp indicating when the specified group was last modified.
    int
    getModifiedBy(int groupId)
    Retrieves the unique identifier of the user who last modified the group specified by its unique identifier.
    getName(int groupId)
    Retrieves the name of the group associated with the specified group ID.
    Retrieves a list of names associated with the groups.
    Retrieves the parent information associated with the group.
    Retrieves the permission details associated with the group.
    int
    getPriority(int groupId)
    Retrieves the priority level assigned to a group specified by its unique identifier.
    getTeamSort(int groupId)
    Retrieves the team sort value associated with the specified group ID.
    int
    getUniqueId(String groupName)
    Retrieves the unique identifier for the specified group name.
    Retrieves a list of unique identifiers for the groups.
    void
    Loads expired group data for processing or further operations.
    void
    rename(int executorId, int groupId, String newName)
    Renames the specified group to a new name.
    void
    setPriority(int executorId, int groupId, int priority)
    Updates the priority level of a specified group.
    void
    setTeamSort(int executorId, int groupId, String teamSort)
    Sets the team sort order for the specified group.
  • Method Details

    • existsGroup

      boolean existsGroup(int groupId)
      Checks if a group with the specified group ID exists.
      Parameters:
      groupId - The unique identifier of the group to check.
      Returns:
      True if the group exists, false otherwise.
    • existsGroup

      boolean existsGroup(String groupName)
      Checks if a group with the specified group name exists.
      Parameters:
      groupName - The name of the group to check.
      Returns:
      True if the group exists, false otherwise.
    • createNewGroup

      void createNewGroup(String groupName, int createdBy, int priority, String teamId)
      Creates a new group with the specified details.
      Parameters:
      groupName - The name of the new group to be created.
      createdBy - The ID of the user creating the group.
      priority - The priority level of the group.
      teamId - The ID of the team to which the group belongs.
    • deleteGroup

      void deleteGroup(int executorId, int groupId)
      Deletes a group with the specified group ID.
      Parameters:
      executorId - The unique identifier of the user performing the deletion.
      groupId - The unique identifier of the group to be deleted.
    • getUniqueId

      int getUniqueId(String groupName)
      Retrieves the unique identifier for the specified group name.
      Parameters:
      groupName - The name of the group whose unique identifier is to be retrieved.
      Returns:
      The unique identifier associated with the specified group name.
    • getName

      String getName(int groupId)
      Retrieves the name of the group associated with the specified group ID.
      Parameters:
      groupId - The unique identifier of the group whose name is to be retrieved.
      Returns:
      The name of the group corresponding to the provided group ID.
    • rename

      void rename(int executorId, int groupId, String newName)
      Renames the specified group to a new name.
      Parameters:
      executorId - The unique identifier of the user performing the rename operation.
      groupId - The unique identifier of the group to be renamed.
      newName - The new name for the group.
    • getUniqueIds

      List<Integer> getUniqueIds()
      Retrieves a list of unique identifiers for the groups.
      Returns:
      A list of integers representing the unique identifiers for the groups.
    • getNames

      List<String> getNames()
      Retrieves a list of names associated with the groups.
      Returns:
      A list of strings representing the names of the groups.
    • getPriority

      int getPriority(int groupId)
      Retrieves the priority level assigned to a group specified by its unique identifier.
      Parameters:
      groupId - The unique identifier of the group whose priority is to be retrieved.
      Returns:
      The priority level of the specified group as an integer.
    • setPriority

      void setPriority(int executorId, int groupId, int priority)
      Updates the priority level of a specified group.
      Parameters:
      executorId - The unique identifier of the user performing the update.
      groupId - The unique identifier of the group whose priority is to be set.
      priority - The new priority level to assign to the group.
    • getTeamSort

      String getTeamSort(int groupId)
      Retrieves the team sort value associated with the specified group ID.
      Parameters:
      groupId - The unique identifier of the group whose team sort value is to be retrieved.
      Returns:
      The team sort value of the specified group as a string.
    • setTeamSort

      void setTeamSort(int executorId, int groupId, String teamSort)
      Sets the team sort order for the specified group.
      Parameters:
      executorId - The unique identifier of the user performing the operation.
      groupId - The unique identifier of the group whose team sort is being set.
      teamSort - The new team sort value to assign to the group.
    • getCreatedBy

      int getCreatedBy(int groupId)
      Retrieves the unique identifier of the user who created the specified group.
      Parameters:
      groupId - The unique identifier of the group whose creator's ID is to be retrieved.
      Returns:
      The unique identifier of the user who created the specified group.
    • getCreatedAt

      Timestamp getCreatedAt(int groupId)
      Retrieves the creation timestamp of the group specified by its unique ID.
      Parameters:
      groupId - The unique identifier of the group whose creation timestamp is to be retrieved.
      Returns:
      The creation timestamp of the group as a Timestamp.
    • getModifiedBy

      int getModifiedBy(int groupId)
      Retrieves the unique identifier of the user who last modified the group specified by its unique identifier.
      Parameters:
      groupId - The unique identifier of the group whose modifier is to be retrieved.
      Returns:
      The unique identifier of the user who last modified the specified group.
    • getModifiedAt

      Timestamp getModifiedAt(int groupId)
      Retrieves the timestamp indicating when the specified group was last modified.
      Parameters:
      groupId - The unique identifier of the group whose modification timestamp is to be retrieved.
      Returns:
      A Timestamp object representing the last modification time of the specified group.
    • createDefaultGroup

      void createDefaultGroup(String groupName)
      Creates a default group with the specified name.
      Parameters:
      groupName - The name of the group to be created.
    • loadExpired

      void loadExpired()
      Loads expired group data for processing or further operations. This method fetches and handles groups that have surpassed their expiration criteria. Typically used to manage or clean up expired group entries.
    • getColor

      GroupColor getColor()
      Retrieves the color information associated with a group.
      Returns:
      An instance of GroupColor representing the color configuration of the group.
    • getParent

      GroupParent getParent()
      Retrieves the parent information associated with the group.
      Returns:
      An instance of GroupParent representing the parent configuration of the group.
    • getPermission

      GroupPermission getPermission()
      Retrieves the permission details associated with the group.
      Returns:
      An instance of GroupPermission representing the permission configuration of the group.