Class GroupProvider

java.lang.Object
de.murmelmeister.murmelapi.group.GroupProvider
All Implemented Interfaces:
Group

public final class GroupProvider extends Object implements Group
  • Field Details

  • Constructor Details

    • GroupProvider

      public GroupProvider()
  • Method Details

    • createTable

      private void createTable(String tableName)
    • existsGroup

      public boolean existsGroup(int id)
      Description copied from interface: Group
      Checks if a group exists.
      Specified by:
      existsGroup in interface Group
      Parameters:
      id - The id of the group.
      Returns:
      True if the group exists, otherwise false.
    • existsGroup

      public boolean existsGroup(String name)
      Description copied from interface: Group
      Checks if a group exists.
      Specified by:
      existsGroup in interface Group
      Parameters:
      name - The name of the group.
      Returns:
      True if the group exists, otherwise false.
    • createNewGroup

      public void createNewGroup(String name, int creatorId, int sortId, String teamId)
      Description copied from interface: Group
      Creates a new group and checks if the group already exists. If the group already exists, the method will return without creating a new group.
      Specified by:
      createNewGroup in interface Group
      Parameters:
      name - The name of the group.
      creatorId - The creator id of the group.
      sortId - The sort id of the group.
      teamId - The team id of the group.
    • deleteGroup

      public void deleteGroup(int id)
      Description copied from interface: Group
      Deletes a group.
      Specified by:
      deleteGroup in interface Group
      Parameters:
      id - The id of the group.
    • getUniqueId

      public int getUniqueId(String name)
      Description copied from interface: Group
      Obtains the unique id of a group.
      Specified by:
      getUniqueId in interface Group
      Parameters:
      name - The name of the group.
      Returns:
      The unique id of the group.
    • getName

      public String getName(int id)
      Description copied from interface: Group
      Obtains the name of a group.
      Specified by:
      getName in interface Group
      Parameters:
      id - The id of the group.
      Returns:
      The name of the group.
    • rename

      public void rename(int id, String newName)
      Description copied from interface: Group
      Renames a group.
      Specified by:
      rename in interface Group
      Parameters:
      id - The id of the group.
      newName - The new name of the group.
    • rename

      public void rename(String oldName, String newName)
      Description copied from interface: Group
      Renames a group.
      Specified by:
      rename in interface Group
      Parameters:
      oldName - The old name of the group.
      newName - The new name of the group.
    • getUniqueIds

      public List<Integer> getUniqueIds()
      Description copied from interface: Group
      Obtains a list of all unique ids of the groups.
      Specified by:
      getUniqueIds in interface Group
      Returns:
      A list of all unique ids of the groups.
    • getNames

      public List<String> getNames()
      Description copied from interface: Group
      Obtains a list of all names of the groups.
      Specified by:
      getNames in interface Group
      Returns:
      A list of all names of the groups.
    • loadExpired

      public void loadExpired()
      Description copied from interface: Group
      Loads all expired things.
      Specified by:
      loadExpired in interface Group
    • createDefaultGroup

      private int createDefaultGroup()
    • getDefaultGroup

      public int getDefaultGroup()
      Description copied from interface: Group
      Obtains the default group. The default group is the group with the id 1.
      Specified by:
      getDefaultGroup in interface Group
    • getSettings

      public GroupSettings getSettings()
      Description copied from interface: Group
      Obtains the settings of a group.
      Specified by:
      getSettings in interface Group
      Returns:
      The settings of the group.
    • getColorSettings

      public GroupColorSettings getColorSettings()
      Description copied from interface: Group
      Obtains the color settings of a group.
      Specified by:
      getColorSettings in interface Group
      Returns:
      The color settings of the group.
    • getParent

      public GroupParent getParent()
      Description copied from interface: Group
      Obtains the parent of a group.
      Specified by:
      getParent in interface Group
      Returns:
      The parent of the group.
    • getPermission

      public GroupPermission getPermission()
      Description copied from interface: Group
      Obtains the permission of a group.
      Specified by:
      getPermission in interface Group
      Returns:
      The permission of the group.