Package cn.lunadeer.dominion.api.dtos
Interface GroupDTO
public interface GroupDTO
Interface representing a Group Data Transfer Object (DTO).
-
Method Summary
Modifier and TypeMethodDescription@NotNull Integer
getDomID()
Gets the ID of the dominion to which the group belongs.Gets all flag values for the group.@NotNull Boolean
getFlagValue
(@NotNull PriFlag flag) Gets the value of a specific flag for the group.@NotNull Integer
getId()
Gets the ID of the group.Gets all members of the group.@NotNull String
Gets the name of the group with color codes as a Bukkit type.@NotNull net.kyori.adventure.text.Component
Gets the name of the group with color codes as a `Component` type.@NotNull String
Gets the name of the group in plain text (without color codes).@NotNull String
Gets the raw name of the group (with color codes).@Nullable GroupDTO
setFlagValue
(@NotNull PriFlag flag, @NotNull Boolean value) Sets the value of a specific flag for the group.@NotNull GroupDTO
Sets the name of the group, which can include color codes.
-
Method Details
-
getId
Gets the ID of the group.- Returns:
- the ID of the group
-
getDomID
Gets the ID of the dominion to which the group belongs.- Returns:
- the ID of the dominion
-
setName
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
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
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
Gets the name of the group with color codes as a Bukkit type.- Returns:
- the name of the group with color codes
-
getFlagValue
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
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 flagvalue
- the value of the flag- Returns:
- the group object
- Throws:
SQLException
- if a database access error occurs
-
getMembers
Gets all members of the group.- Returns:
- a list of members
- Throws:
SQLException
- if a database access error occurs
-