Newer
Older
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
package com.example.schedulerapp;
import java.time.LocalDateTime;
public class TimeOff {
private final int ID;
private final int employeeID;
private final String startDate;
private final String endDate;
private boolean approval;
private final String reason;
public TimeOff(String[] timeOffSplit){
this.ID = Integer.parseInt(timeOffSplit[0]);
this.employeeID = Integer.parseInt(timeOffSplit[1]);
this.startDate = timeOffSplit[2];
this.endDate = timeOffSplit[3];
this.approval = Boolean.getBoolean(timeOffSplit[4]);
this.reason = timeOffSplit[5];
}
public int getID() {
return ID;
}
public int getEmployeeID() {
return employeeID;
}
public String getStartDate() {
return startDate;
}
public String getEndDate() {
return endDate;
}
public boolean isApproval() {
return approval;
}
public String getReason() {
return reason;
}
/*
ONLY USE for updating locally, if you're trying to update it on the server look for a method in the Model class.
This is for the ReceiveThread class to update changes from the server.
*/
public void setApproval(boolean approval) {
this.approval = approval;
}
}