File tree Expand file tree Collapse file tree 2 files changed +26
-9
lines changed
src/main/java/data_access Expand file tree Collapse file tree 2 files changed +26
-9
lines changed Original file line number Diff line number Diff line change 4
4
5
5
// use case layer
6
6
7
- public interface IFlashcardDataAccess {
7
+ public interface IFlashcardDataAccess {
8
8
9
9
FlashcardDsRequestModel getFlashcard (Integer flashcardID );
10
10
Original file line number Diff line number Diff line change 4
4
5
5
import java .util .Collection ;
6
6
7
- // use case layer
7
+ /**
8
+ * User Data Access Interface.
9
+ * Application Business Rules
10
+ * @author Justin Li
11
+ */
8
12
9
13
public interface IUserDataAccess {
10
14
@@ -13,14 +17,27 @@ public interface IUserDataAccess {
13
17
* @return the User object who has username
14
18
*/
15
19
CommonUserDsRequestModel getUser (String username );
16
-
20
+ /**
21
+ * @param username the user's username
22
+ * @return True if the user's username is in the database
23
+ */
17
24
boolean existsByName (String username );
18
-
25
+ /**
26
+ * @return all the User objects in the database
27
+ */
19
28
Collection <CommonUserDsRequestModel > getAllUsers ();
20
-
21
- void saveFlashcardSetID (String username , int FlashcardSetID );
22
-
23
- void deleteFlashcardSetID (String username , int FlashcardSetID );
24
-
29
+ /**
30
+ * @param username the user's username
31
+ * @param flashcardSetID the id of the flashcard set that the user would like to create.
32
+ */
33
+ void saveFlashcardSetID (String username , int flashcardSetID );
34
+ /**
35
+ * @param username the user's username
36
+ * @param flashcardSetID the id of the flashcard set that the user would like to delete.
37
+ */
38
+ void deleteFlashcardSetID (String username , int flashcardSetID );
39
+ /**
40
+ * @param user the User object.
41
+ */
25
42
void saveUser (CommonUserDsRequestModel user );
26
43
}
You can’t perform that action at this time.
0 commit comments