Class FColorDao

java.lang.Object
net.flectone.pulse.data.database.dao.FColorDao
All Implemented Interfaces:
BaseDAO<FColorSQL>

public class FColorDao extends Object implements BaseDAO<FColorSQL>
Data Access Object for color data operations in FlectonePulse. Handles persistence and retrieval of player color preferences.
Since:
0.9.0
  • Constructor Details

    • FColorDao

      @Inject public FColorDao(Database database)
  • Method Details

    • database

      public Database database()
      Description copied from interface: BaseDAO
      Gets the database instance associated with this DAO.
      Specified by:
      database in interface BaseDAO<FColorSQL>
      Returns:
      the database instance
    • sqlClass

      public Class<? extends FColorSQL> sqlClass()
      Description copied from interface: BaseDAO
      Gets the SQL interface class for this DAO.
      Specified by:
      sqlClass in interface BaseDAO<FColorSQL>
      Returns:
      the SQL interface class
    • save

      public void save(@NonNull FPlayer fPlayer, @NonNull Map<FColor.Type, Set<FColor>> colors)
    • delete

      public void delete(@NonNull FPlayer fPlayer)
      Deletes the player's color preferences from the database.
      Parameters:
      fPlayer - the player whose colors to delete
    • load

      public Map<FColor.Type, Set<FColor>> load(@NonNull FPlayer fPlayer)
      Loads the player's color preferences from the database.
      Parameters:
      fPlayer - the player whose colors to load
      Returns:
      new FPlayer with colors