Interface GroupDTO


public interface GroupDTO
Interface representing a Group Data Transfer Object (DTO).
  • Method Details

    • getId

      @NotNull @NotNull Integer getId()
      Gets the ID of the group.
      Returns:
      the ID of the group
    • getDomID

      @NotNull @NotNull Integer getDomID()
      Gets the ID of the dominion to which the group belongs.
      Returns:
      the ID of the dominion
    • setName

      @NotNull @NotNull GroupDTO setName(@NotNull @NotNull String name) throws SQLException
      Sets the name of the group, which can include color codes. Returns the group object if successful, otherwise returns null.
      Parameters:
      name - the name of the group
      Returns:
      the group object
      Throws:
      SQLException - if a database access error occurs
    • getNamePlain

      @NotNull @NotNull String getNamePlain()
      Gets the name of the group in plain text (without color codes). This method should be used in most cases to get the group name.
      Returns:
      the plain text name of the group
    • getNameRaw

      @NotNull @NotNull String getNameRaw()
      Gets the raw name of the group (with color codes).
      Returns:
      the raw name of the group
    • getNameColoredComponent

      @NotNull @NotNull net.kyori.adventure.text.Component getNameColoredComponent()
      Gets the name of the group with color codes as a `Component` type.
      Returns:
      the name of the group with color codes
    • getNameColoredBukkit

      @NotNull @NotNull String getNameColoredBukkit()
      Gets the name of the group with color codes as a Bukkit type.
      Returns:
      the name of the group with color codes
    • getFlagValue

      @NotNull @NotNull Boolean getFlagValue(@NotNull @NotNull PriFlag flag)
      Gets the value of a specific flag for the group.
      Parameters:
      flag - the flag
      Returns:
      the value of the flag, or the default value if the flag does not exist
    • getFlagsValue

      @NotNull @NotNull Map<PriFlag,Boolean> getFlagsValue()
      Gets all flag values for the group.
      Returns:
      a map of flag values
    • setFlagValue

      @Nullable @Nullable GroupDTO setFlagValue(@NotNull @NotNull PriFlag flag, @NotNull @NotNull Boolean value) throws SQLException
      Sets the value of a specific flag for the group. Returns the group object if successful, otherwise returns null.
      Parameters:
      flag - the flag
      value - the value of the flag
      Returns:
      the group object
      Throws:
      SQLException - if a database access error occurs
    • getMembers

      List<MemberDTO> getMembers() throws SQLException
      Gets all members of the group.
      Returns:
      a list of members
      Throws:
      SQLException - if a database access error occurs