-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathProject.java
More file actions
85 lines (66 loc) · 1.8 KB
/
Project.java
File metadata and controls
85 lines (66 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import java.io.Serializable;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
/** Entity object representing one project. */
public class Project implements Serializable {
private String title;
private String description;
private String status; // To-Do, In-Progress, Completed
private LocalDate dueDate;
private List<Collaborator> collaborators;
private List<ResearchNote> notes;
public Project(String title) {
this.title = title;
this.description = "";
this.status = "To-Do";
this.dueDate = null;
this.collaborators = new ArrayList<>();
this.notes = new ArrayList<>();
}
// Getters / setters
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public LocalDate getDueDate() {
return dueDate;
}
public void setDueDate(LocalDate dueDate) {
this.dueDate = dueDate;
}
public List<Collaborator> getCollaborators() {
return collaborators;
}
public List<ResearchNote> getNotes() {
return notes;
}
public void addCollaborator(Collaborator c) {
collaborators.add(c);
}
public void addNote(ResearchNote n) {
notes.add(n);
}
@Override
public String toString() {
String base = title;
if (status != null && !status.isEmpty()) {
base += " [" + status + "]";
}
return base;
}
}