Klasse ClassLevelDao

java.lang.Object
de.delinkedde.mobarenareborn.persistence.ClassLevelDao

public final class ClassLevelDao extends Object
Data access for the class_levels table.

Provides loading all of a player's class progress and upserting a single class's progress.

  • Konstruktordetails

    • ClassLevelDao

      public ClassLevelDao(@NotNull @NotNull Database database)
      Parameter:
      database - the database to read from and write to
  • Methodendetails

    • load

      @NotNull public @NotNull Map<String,ClassProgress> load(@NotNull @NotNull UUID uuid) throws SQLException
      Loads all class progress for a player.
      Parameter:
      uuid - the player's unique id
      Gibt zurück:
      a map of class identifier to progress; empty if the player has none
      Löst aus:
      SQLException - if the query fails
    • save

      public void save(@NotNull @NotNull UUID uuid, @NotNull @NotNull ClassProgress progress) throws SQLException
      Inserts or updates a single class's progress for a player.
      Parameter:
      uuid - the player's unique id
      progress - the progress to persist
      Löst aus:
      SQLException - if the statement fails