Class GameSettingsDAOText
java.lang.Object
dao.GameSettingsDAOText
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidloadData(UserDetails userWanted, GameSettings gameSettingsWanted) Loads settings data for the settings last played by the userstatic voidsaveData(UserDetails userForWhichGameSettingsAreToBeSaved, GameSettings gameSettingsToBeSaved) Saves data of given objects to the database.
-
Constructor Details
-
GameSettingsDAOText
public GameSettingsDAOText()
-
-
Method Details
-
loadData
public static void loadData(UserDetails userWanted, GameSettings gameSettingsWanted) throws IOException Loads settings data for the settings last played by the user- Parameters:
userWanted- User details associated with the user will be loaded into this objectgameSettingsWanted-- Throws:
FileNotFoundExceptionIOException
-
saveData
public static void saveData(UserDetails userForWhichGameSettingsAreToBeSaved, GameSettings gameSettingsToBeSaved) throws FileNotFoundException, IOException, ClassNotFoundException Saves data of given objects to the database. If user settings and/or game settings don't exist new data is inserted else existing data is updated SaveData does the saving using PreparedStatments.- Parameters:
userForWhichGameSettingsAreToBeSaved- UserDetails to savegameSettingsToBeSaved-- Throws:
FileNotFoundExceptionClassNotFoundExceptionIOException
-