-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTask.java
More file actions
137 lines (107 loc) · 3.75 KB
/
Task.java
File metadata and controls
137 lines (107 loc) · 3.75 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
package TaskManagerProject;
import java.time.LocalDateTime;
import java.util.UUID;
//The relationship between Employee and Task is a
// bidirectional association (one-to-many).
// Employee maintains a list of tasks,
// and each task references its assigned employee.
// There is no lifecycle dependency, so this is not composition.
// It is closest to aggregation, but technically it is a bidirectional
// association in the object model.
//ENTITY CLASS: (Task Module a) Task Page):
//Note:UUID data type; makes the IDs unique across different systems, can be
public class Task {
private UUID TaskCode; //taskid
private String Taskdescription;
private String TaskTitle;
//Connecting this class with the other classes Employee / Project
private Employee TaskAssignedEmp;
private Project TaskProject;
// Status & Priority
private String taskPhase; // From your TaskPhases list (PENDING for ex)
private String priority; // LOW, MEDIUM, HIGH
//MetaData
private String CreatorName;
//Review
LocalDateTime StartDate;
LocalDateTime EndDate;
private int estimationHours;
// Constructor
//Employee TaskAssignedEmp: Association relationship since Employee object got passed
//as a parameter to the "Task" constructor.
public Task(String TaskTitle, String Taskdescription, Employee TaskAssignedEmp,
Project TaskProject, String priority, int estimationHours, String CreatorName)
{
this.TaskCode = UUID.randomUUID();
this.TaskTitle = TaskTitle;
this.Taskdescription = Taskdescription;
this.StartDate = LocalDateTime.now(); //Now, one a task created. it's created now.
this.TaskProject = TaskProject;
this.priority = priority;
this.TaskAssignedEmp = TaskAssignedEmp;
this.CreatorName = CreatorName;
this.taskPhase = "PENDING"; //PENDING BY DEFAULT;
this.estimationHours = estimationHours;
}
//Getters AND setters
public UUID getTaskCode() {
return TaskCode;
}
public String getTaskdescription() {
return Taskdescription;
}
public String getTaskTitle() {
return TaskTitle;
}
public Employee getTaskAssignedEmp() {
return TaskAssignedEmp;
}
public Project getTaskProject() {
return TaskProject;
}
public String getTaskPhase() {
return taskPhase;
}
public String getPriority() {
return priority;
}
public String getCreatorName() {
return CreatorName;
}
public LocalDateTime getStartDate() {
return StartDate;
}
public LocalDateTime getEndDate() {
return EndDate;
}
public int getEstimationHours() {
return estimationHours;
}
public void setTaskdescription(String taskdescription) {
Taskdescription = taskdescription;
}
public void setTaskTitle(String taskTitle) {
TaskTitle = taskTitle;
}
public void setTaskPhase(String taskPhase) {
this.taskPhase = taskPhase;
}
public void setPriority(String priority) {
this.priority = priority;
}
public void setCreatorName(String creatorName) {
CreatorName = creatorName;
}
public void setStartDate(LocalDateTime startDate) {
StartDate = startDate;
}
public void setEndDate(LocalDateTime endDate) {
EndDate = endDate;
}
public void setEstimationHours(int estimationHours) {
this.estimationHours = estimationHours;
}
public void setTaskAssignedEmp(Employee taskAssignedEmp) {
TaskAssignedEmp = taskAssignedEmp;
}
}