1
1
package data_access_use_case .entity_request_models ;
2
- // use case layer
3
2
4
3
import java .time .LocalDateTime ;
4
+ /**
5
+ * Flashcard Request Model.
6
+ * Application Business Rules
7
+ * @author Justin Li
8
+ */
5
9
6
10
public class FlashcardDsRequestModel {
7
11
private String term ;
@@ -10,6 +14,14 @@ public class FlashcardDsRequestModel {
10
14
private int flashcardId ;
11
15
private final int belongsToId ;
12
16
17
+ /**
18
+ * Creates a flashcard response model based on the following parameters.
19
+ * @param term the flashcard term
20
+ * @param definition the flashcard definition for the term
21
+ * @param creationDate the time the flashcard is created (time formatted in LocalDateTime)
22
+ * @param flashcardId the flashcard id
23
+ * @param belongsToId the id of the flashcard set that the flashcard is in.
24
+ */
13
25
public FlashcardDsRequestModel (String term , String definition , LocalDateTime creationDate ,
14
26
int flashcardId , int belongsToId ){
15
27
this .term = term ;
@@ -18,33 +30,54 @@ public FlashcardDsRequestModel(String term, String definition, LocalDateTime cre
18
30
this .flashcardId = flashcardId ;
19
31
this .belongsToId = belongsToId ;
20
32
}
33
+ /**
34
+ * Gets the flashcard term.
35
+ * @return the flashcard term
36
+ */
21
37
public String getTerm () {
22
38
return term ;
23
39
}
24
-
40
+ /**
41
+ * Gets the flashcard definition.
42
+ * @return the flashcard definition.
43
+ */
25
44
public String getDefinition () {
26
45
return definition ;
27
46
}
28
-
47
+ /**
48
+ * Gets the flashcard creation date.
49
+ * @return the flashcard creation date in LocalDateTime formatting.
50
+ */
29
51
public LocalDateTime getCreationDate () {
30
52
return creationDate ;
31
53
}
32
-
54
+ /**
55
+ * Gets the flashcard id.
56
+ * @return the flashcard id.
57
+ */
33
58
public int getFlashcardId (){
34
59
return flashcardId ;
35
60
}
36
-
61
+ /**
62
+ * Gets the id of the flashcard set that the flashcard belongs to.
63
+ * @return the id of the flashcard set that the flashcard belongs to.
64
+ */
37
65
public int getBelongsToId (){
38
66
return belongsToId ;
39
67
}
40
- public void setTerm (String term ) {
41
- this .term = term ;
42
- }
43
-
68
+ /**
69
+ * Sets the term.
70
+ */
71
+ public void setTerm (String term ) {this .term = term ;}
72
+ /**
73
+ * Sets the definition.
74
+ */
44
75
public void setDefinition (String definition ) {
45
76
this .definition = definition ;
46
77
}
47
-
78
+ /**
79
+ * Sets the flashcard id.
80
+ */
48
81
public void setFlashcardId (int flashcardId ) {
49
82
this .flashcardId = flashcardId ;
50
83
}
0 commit comments