Package cn.lunadeer.dominion.api.dtos
Interface MemberDTO
public interface MemberDTO
Interface representing a Member Data Transfer Object (DTO).
-
Method Summary
Modifier and TypeMethodDescriptiongetDomID()
Gets the ID of the dominion to which the member belongs.Gets all flag values for the member.@NotNull Boolean
getFlagValue
(PriFlag flag) Gets the value of a specific flag for the member.Gets the ID of the group to which the member belongs.getId()
Gets the member ID.@NotNull PlayerDTO
Gets the player object associated with the member.Gets the member UUID.@Nullable MemberDTO
setFlagValue
(@NotNull PriFlag flag, @NotNull Boolean value) Sets the value of a specific flag for the member.
-
Method Details
-
getId
Integer getId()Gets the member ID.- Returns:
- the member ID
-
getPlayerUUID
UUID getPlayerUUID()Gets the member UUID.- Returns:
- the member UUID
-
getDomID
Integer getDomID()Gets the ID of the dominion to which the member belongs.- Returns:
- the dominion ID
-
getGroupId
Integer getGroupId()Gets the ID of the group to which the member belongs.- Returns:
- the group ID, or -1 if the member does not belong to any group
-
getFlagValue
Gets the value of a specific flag for the member.- 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 member.- Returns:
- a map of flag values
-
setFlagValue
@Nullable @Nullable MemberDTO setFlagValue(@NotNull @NotNull PriFlag flag, @NotNull @NotNull Boolean value) throws SQLException Sets the value of a specific flag for the member. Returns the member object if successful, otherwise returns null.- Parameters:
flag
- the flagvalue
- the value of the flag- Returns:
- the member object, or null if the operation fails
- Throws:
SQLException
- if a database access error occurs
-
getPlayer
Gets the player object associated with the member.- Returns:
- the player object
-