Interface GenericDAO

All Known Implementing Classes:
GsonDAO

public interface GenericDAO
Generic data access object layer
  • Method Details

    • writeHouses

      void writeHouses(@NotNull @NotNull Map<UUID,O2HouseType> map)
      Write house membership data
      Parameters:
      map - a map of players UUIDs and which house type they belong to
    • writeHousePoints

      void writeHousePoints(@NotNull @NotNull Map<O2HouseType,Integer> map)
      Write house points data
      Parameters:
      map - a map of house type and the number of points
    • writeSaveData

      void writeSaveData(@NotNull @NotNull HashMap<String,String> map, String filename)
      Data writer
      Parameters:
      map - the data to write
      filename - the name of the output stream
    • writeSaveData

      void writeSaveData(@NotNull @NotNull Map<String,Map<String,String>> map, String filename)
      Data writer
      Parameters:
      map - the data to write
      filename - the name of the output stream
    • writeSaveData

      void writeSaveData(@NotNull @NotNull List<Map<String,String>> list, String filename)
      Data writer
      Parameters:
      list - the data to write
      filename - the name of the output stream
    • readHouses

      @Nullable @Nullable Map<UUID,O2HouseType> readHouses()
      Read saved house sort data
      Returns:
      a map of player IDs and the houses they are sorted to
    • readHousePoints

      @Nullable @Nullable Map<O2HouseType,Integer> readHousePoints()
      Read saved house points data
      Returns:
      the house types and their points
    • readSavedDataMapStringMap

      @Nullable @Nullable Map<String,Map<String,String>> readSavedDataMapStringMap(@NotNull @NotNull String filename)
      Data reader
      Parameters:
      filename - the input stream to read
      Returns:
      the saved data
    • readSavedDataListMap

      @Nullable @Nullable List<Map<String,String>> readSavedDataListMap(@NotNull @NotNull String filename)
      Data reader
      Parameters:
      filename - the input stream to read
      Returns:
      the saved data