Class EventSchedule
java.lang.Object
com.example.skeddly.business.event.EventSchedule
This class represents the schedule of an event with a start and end time + reg start/end times
-
Constructor Summary
ConstructorsConstructorDescriptionNo arg Constructor for the EventSchedule.EventSchedule(LocalDateTime start, LocalDateTime end, LocalDateTime regStart, LocalDateTime regEnd) Constructor for the EventSchedule without days of weekEventSchedule(LocalDateTime start, LocalDateTime end, LocalDateTime regStart, LocalDateTime regEnd, Boolean[] daysOfWeek) Constructor for the EventSchedule -
Method Summary
Modifier and TypeMethodDescriptionGets the days of the week the event occurs onlongGets the end time of the eventlongGets the end of the registration period.longGets the start of the registration period.longGets the start time of the eventbooleanReturns if the event is recurringbooleanGets whether the event registration period has ended or not.voidsetDaysOfWeek(List<Boolean> daysOfWeek) Sets the days of the week the event occurs onvoidsetEndTime(long endTime) Sets the end time of the eventvoidsetRecurring(boolean recurring) Sets if the event is recurringvoidsetRegEnd(long regEnd) Sets the end of the registration period.voidsetRegStart(long regStart) Sets the start of the registration period.voidsetStartTime(long startTime) Sets the start time of the event
-
Constructor Details
-
EventSchedule
public EventSchedule()No arg Constructor for the EventSchedule. Required by Firestore. -
EventSchedule
public EventSchedule(LocalDateTime start, LocalDateTime end, LocalDateTime regStart, LocalDateTime regEnd, Boolean[] daysOfWeek) Constructor for the EventSchedule- Parameters:
start- The start time of the eventend- The end time of the eventdaysOfWeek- The days of the week the event occurs on
-
EventSchedule
public EventSchedule(LocalDateTime start, LocalDateTime end, LocalDateTime regStart, LocalDateTime regEnd) Constructor for the EventSchedule without days of week- Parameters:
start- The start time of the eventend- The end time of the event
-
-
Method Details
-
getStartTime
public long getStartTime()Gets the start time of the event- Returns:
- The start time of the event
-
setStartTime
public void setStartTime(long startTime) Sets the start time of the event- Parameters:
startTime- The start time of the event
-
getEndTime
public long getEndTime()Gets the end time of the event- Returns:
- The end time of the event
-
setEndTime
public void setEndTime(long endTime) Sets the end time of the event- Parameters:
endTime- The end time of the event
-
getRegStart
public long getRegStart()Gets the start of the registration period.- Returns:
- A unix epoch representing the start of the registration period.
-
setRegStart
public void setRegStart(long regStart) Sets the start of the registration period.- Parameters:
regStart- A unix epoch representing the start of the registration period.
-
getRegEnd
public long getRegEnd()Gets the end of the registration period.- Returns:
- A unix epoch representing the end of the registration period.
-
setRegEnd
public void setRegEnd(long regEnd) Sets the end of the registration period.- Parameters:
regEnd- A unix epoch representing the end of the registration period.
-
isRegistrationOver
public boolean isRegistrationOver()Gets whether the event registration period has ended or not.- Returns:
- True if it has ended. False otherwise.
-
getDaysOfWeek
Gets the days of the week the event occurs on- Returns:
- The days of the week the event occurs on
-
setDaysOfWeek
Sets the days of the week the event occurs on- Parameters:
daysOfWeek- The days of the week the event occurs on
-
isRecurring
public boolean isRecurring()Returns if the event is recurring- Returns:
- If the event is recurring
-
setRecurring
public void setRecurring(boolean recurring) Sets if the event is recurring- Parameters:
recurring- If the event is recurring
-