Skip to content
Snippets Groups Projects
Commit e9237ed4 authored by Rafi Zereselasie (raz070)'s avatar Rafi Zereselasie (raz070)
Browse files

Commented some code

parent ec7d2800
No related branches found
No related tags found
No related merge requests found
......@@ -48,6 +48,16 @@ public class Schedule {
}
}
/*
Name: removeShiftByID
Parameters:
int shift_id: The shift unique ID.
String date: The date of the shift in the form "YYYY-MM-DD".
String start: The start time of the shift in 24-hour time "HHMM".
String end: The end time of the shift in 24-hour time "HHMM".
Description: Edits the time and date of the of a shift if it has the same shift id
Return: none
*/
protected void editShift(Integer shift_id, String date, String start,String end){
Date newDate = Date.valueOf(date);
System.out.println(newDate);
......@@ -85,6 +95,14 @@ public class Schedule {
return response;
}
/*
Name: getShiftsByWeek
Parameters:
String startDate: The start date of the week. In the form "YYYY-MM-DD".
String endDate: The last date of the week. In the form "YYYY-MM-DD".
Description: Returns info for all shifts with in the given start date and end date .
Return: String
*/
protected String getShiftsByWeek(String startDate, String endDate){
Date newStart = Date.valueOf(startDate);
Date newEnd = Date.valueOf(endDate);
......@@ -105,6 +123,15 @@ public class Schedule {
return response;
}
/*
Name: getEmployeeShiftsByWeek
Parameters:
Int ID: An employee id.
String startDate: The start date of the week. In the form "YYYY-MM-DD".
String endDate: The last date of the week. In the form "YYYY-MM-DD".
Description: Returns info for all shifts with in the given start date and end date, for the given employee.
Return: String
*/
protected String getEmployeeShiftsByWeek(int ID, String startDate, String endDate){
Date newStart = Date.valueOf(startDate);
Date newEnd = Date.valueOf(endDate);
......@@ -125,6 +152,14 @@ public class Schedule {
return response;
}
/*
Name: allShifts
Parameters:
None
Description: Returns a list of all shifts in the database. Where each '/' split is a shift, and each '.' split
is a detail of the shift.
Return: String
*/
protected String allShifts(){
String response = "allShifts";
try {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment