java.lang.Object
com.example.project.services.sqlite.dAOs.DictionaryDAO
The SQLite Dictionary. The connection returned from SQLiteDictionaryConnection().getInstance() is always the same.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for this class SQLLiteDictionary.DictionaryDAO
(Connection connection, Logger logger) constructor with injection for tests. -
Method Summary
Modifier and TypeMethodDescriptiongetWordDefinition
(String wordToFind) gets the words definition.boolean
isWordInDictionary
(String wordToCheck) gets if word is in dictionary.
-
Constructor Details
-
DictionaryDAO
public DictionaryDAO()Constructor for this class SQLLiteDictionary. -
DictionaryDAO
constructor with injection for tests.- Parameters:
connection
- mock connection.logger
- a mock logger.
-
-
Method Details
-
getWordDefinition
gets the words definition.- Parameters:
wordToFind
- Word to get definition of.- Returns:
- Returns the definition.
-
isWordInDictionary
gets if word is in dictionary.- Parameters:
wordToCheck
- Word to check.- Returns:
- returns the boolean value indicating whether the word exists in our database.
-