Class DataStoreQueries

java.lang.Object
com.djrapitops.plan.storage.database.queries.DataStoreQueries

public class DataStoreQueries extends Object
Static method class for single item store queries.
  • Method Details

    • storeSession

      public static Executable storeSession(FinishedSession session)
      Store a finished session in the database.
      Parameters:
      session - a finished session
      Returns:
      Executable, use inside a Transaction
    • insertWorldName

      public static Executable insertWorldName(ServerUUID serverUUID, String worldName)
    • storeGeoInfo

      public static Executable storeGeoInfo(UUID playerUUID, GeoInfo geoInfo)
      Store player's Geo Information in the database.
      Parameters:
      playerUUID - UUID of the player.
      geoInfo - GeoInfo of the player.
      Returns:
      Executable, use inside a Transaction
    • registerBaseUser

      public static ExecStatement registerBaseUser(UUID playerUUID, long registered, String playerName)
      Store a BaseUser for the player in the database.
      Parameters:
      playerUUID - UUID of the player.
      registered - Time the player registered on the server for the first time.
      playerName - Name of the player.
      Returns:
      Executable, use inside a Transaction
    • updatePlayerName

      public static Executable updatePlayerName(UUID playerUUID, String playerName)
      Update player's name in the database in case they have changed it.
      Parameters:
      playerUUID - UUID of the player.
      playerName - Name of the player.
      Returns:
      Executable, use inside a Transaction
    • registerUserInfo

      public static Executable registerUserInfo(UUID playerUUID, long registered, ServerUUID serverUUID, String joinAddress)
      Store UserInfo about a player on a server in the database.
      Parameters:
      playerUUID - UUID of the player.
      registered - Time the player registered on the server.
      serverUUID - UUID of the Plan server.
      Returns:
      Executable, use inside a Transaction
    • updateMainRegisterDate

      public static Executable updateMainRegisterDate(UUID playerUUID, long registered)
    • storePing

      public static Executable storePing(UUID playerUUID, ServerUUID serverUUID, Ping ping)
      Store Ping data of a player on a server.
      Parameters:
      playerUUID - UUID of the player.
      serverUUID - UUID of the Plan server.
      ping - Ping data entry
      Returns:
      Executable, use inside a Transaction
    • storeTPS

      public static Executable storeTPS(ServerUUID serverUUID, TPS tps)
      Store TPS data of a server.
      Parameters:
      serverUUID - UUID of the Plan server.
      tps - TPS data entry
      Returns:
      Executable, use inside a Transaction
    • storePlayerNickname

      public static Executable storePlayerNickname(UUID playerUUID, Nickname nickname)
      Store nickname information of a player on a server.
      Parameters:
      playerUUID - UUID of the player.
      nickname - Nickname information.
      Returns:
      Executable, use inside a Transaction
    • updateJoinAddress

      public static Executable updateJoinAddress(UUID playerUUID, ServerUUID serverUUID, String joinAddress)