Package net.pottercraft.ollivanders2
Interface GenericDAO
- All Known Implementing Classes:
GsonDAO
public interface GenericDAO
Generic data access object layer
-
Method Summary
Modifier and TypeMethodDescription@Nullable Map<O2HouseType, Integer> Read saved house points data@Nullable Map<UUID, O2HouseType> Read saved house sort datareadSavedDataListMap(@NotNull String filename) Data readerreadSavedDataMapStringMap(@NotNull String filename) Data readervoidwriteHousePoints(@NotNull Map<O2HouseType, Integer> map) Write house points datavoidwriteHouses(@NotNull Map<UUID, O2HouseType> map) Write house membership datavoidwriteSaveData(@NotNull HashMap<String, String> map, String filename) Data writervoidData writervoidData writer
-
Method Details
-
writeHouses
Write house membership data- Parameters:
map- a map of players UUIDs and which house type they belong to
-
writeHousePoints
Write house points data- Parameters:
map- a map of house type and the number of points
-
writeSaveData
Data writer- Parameters:
map- the data to writefilename- the name of the output stream
-
writeSaveData
Data writer- Parameters:
map- the data to writefilename- the name of the output stream
-
writeSaveData
Data writer- Parameters:
list- the data to writefilename- the name of the output stream
-
readHouses
Read saved house sort data- Returns:
- a map of player IDs and the houses they are sorted to
-
readHousePoints
Read saved house points data- Returns:
- the house types and their points
-
readSavedDataMapStringMap
@Nullable @Nullable Map<String,Map<String, readSavedDataMapStringMapString>> (@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
-