Class UserIdentifierQueries

java.lang.Object
com.djrapitops.plan.storage.database.queries.objects.UserIdentifierQueries

public class UserIdentifierQueries extends Object
Queries for fetching different user identifiers in the database.
  • Method Details

    • fetchAllPlayerUUIDs

      public static Query<Set<UUID>> fetchAllPlayerUUIDs()
      Query database for all player UUIDs stored in the Plan database.
      Returns:
      Set of UUIDs.
    • fetchPlayerUUIDsOfServer

      public static Query<Set<UUID>> fetchPlayerUUIDsOfServer(ServerUUID serverUUID)
      Query database for all player UUIDs that have joined a server.
      Parameters:
      serverUUID - UUID of the Plan server.
      Returns:
      Set of UUIDs.
    • fetchAllPlayerNames

      public static Query<Map<UUID,String>> fetchAllPlayerNames()
      Query database for a Map for all UUIDs and Player names.
      Returns:
      Map: Player UUID - Player name
    • fetchPlayerUUIDOf

      public static Query<Optional<UUID>> fetchPlayerUUIDOf(String playerName)
      Query database for a Player UUID matching a specific player's name.
      Parameters:
      playerName - Name of the player, case does not matter.
      Returns:
      Optional: UUID if found, empty if not.
    • fetchPlayerNameOf

      public static Query<Optional<String>> fetchPlayerNameOf(UUID playerUUID)
      Query database for a Player name matching a specific player's UUID.
      Parameters:
      playerUUID - UUID of the Player
      Returns:
      Optional: name if found, empty if not.
    • fetchMatchingPlayerNames

      public static Query<List<String>> fetchMatchingPlayerNames(String searchFor)
    • fetchAllUserIds

      public static Query<Set<Integer>> fetchAllUserIds()
    • fetchUserId

      public static Query<Optional<Integer>> fetchUserId(UUID playerUUID)