Class InstructionSession
java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.academy.InstructionSession
- All Implemented Interfaces:
Serializable
,Comparable<Object>
,Instruction
,InstructorBean
,CalendarEntry
,IDBean
,TimeSpan
,ViewEntry
,Cacheable
public class InstructionSession
extends DatabaseBean
implements ViewEntry, Instruction, InstructorBean, TimeSpan
A bean used to store Flight Academy instruction session information.
- Since:
- 1.0
- Version:
- 7.0
- Author:
- Luke
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final String[]
-
Constructor Summary
ConstructorsConstructorDescriptionInstructionSession
(int id, int courseID) Creates a new Instruction Session bean. -
Method Summary
Modifier and TypeMethodDescriptionint
Comapres two sessions by comparing their start times.Returns any remarks about the Session.int
Returns the Flight Academy Course ID.getDate()
Returns the date if rendered within a calendar view.Returns the end time of this Session.int
Returns the Instructor assigned to this Session.getName()
Returns the Course name.boolean
Returns whether the Pilot missed the Session.int
Returns the Pilot participating in this Session.Returns the CSS row class name if displayed in a view table.Returns the start time of this Session.int
Returns the status of this Session.Returns the status of this Session.void
setComments
(String txt) Updates the remarks for this Session.void
setCourseID
(int id) Updates the Flight Academy Course..void
setEndTime
(Instant dt) Updates the end time for this Session.void
setInstructorID
(int id) Updates the Instructor assigned to this session.void
Updates the Course name.void
setNoShow
(boolean noShow) Marks the Pilot as a "no-show".void
setPilotID
(int id) Updates the Pilot participating in this session.void
setStartTime
(Instant dt) Updates the start time for this Session.void
setStatus
(int status) Updates the Session's status.Methods inherited from class org.deltava.beans.DatabaseBean
cacheKey, equals, getHexID, getID, hashCode, setID, validateID, validateID
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.deltava.beans.TimeSpan
getDuration, hasTimes
-
Field Details
-
SCHEDULED
public static final int SCHEDULED- See Also:
-
CANCELED
public static final int CANCELED- See Also:
-
COMPLETE
public static final int COMPLETE- See Also:
-
STATUS_NAMES
-
-
Constructor Details
-
InstructionSession
public InstructionSession(int id, int courseID) Creates a new Instruction Session bean.- Parameters:
id
- the database IDcourseID
- the database ID of the Course- Throws:
IllegalArgumentException
- if id is negative or courseID is zero or negative
-
-
Method Details
-
getName
Returns the Course name. This may not be populated.- Returns:
- the course name
- See Also:
-
getInstructorID
public int getInstructorID()Returns the Instructor assigned to this Session.- Specified by:
getInstructorID
in interfaceInstruction
- Specified by:
getInstructorID
in interfaceInstructorBean
- Returns:
- the Instructor's database ID
- See Also:
-
getPilotID
public int getPilotID()Returns the Pilot participating in this Session.- Specified by:
getPilotID
in interfaceInstruction
- Returns:
- the Pilot's database ID
- See Also:
-
getCourseID
public int getCourseID()Returns the Flight Academy Course ID.- Specified by:
getCourseID
in interfaceInstruction
- Returns:
- the database ID of the Course
- See Also:
-
getStatus
public int getStatus()Returns the status of this Session.- Returns:
- the status code
- See Also:
-
getStatusName
Returns the status of this Session.- Returns:
- the status name
- See Also:
-
getStartTime
Returns the start time of this Session.- Specified by:
getStartTime
in interfaceTimeSpan
- Returns:
- the start date/time
- See Also:
-
getEndTime
Returns the end time of this Session.- Specified by:
getEndTime
in interfaceTimeSpan
- Returns:
- the end date/time
- See Also:
-
getNoShow
public boolean getNoShow()Returns whether the Pilot missed the Session.- Returns:
- TRUE if the Pilot did not attend, otherwise FALSE
- See Also:
-
getComments
Returns any remarks about the Session.- Specified by:
getComments
in interfaceInstruction
- Returns:
- the remarks
- See Also:
-
setName
Updates the Course name.- Parameters:
name
- the name- Throws:
NullPointerException
- if name is null- See Also:
-
setInstructorID
public void setInstructorID(int id) Updates the Instructor assigned to this session.- Parameters:
id
- the Instructor database ID- Throws:
IllegalArgumentException
- if id is zero or negative- See Also:
-
setPilotID
public void setPilotID(int id) Updates the Pilot participating in this session.- Parameters:
id
- the Pilot database ID- Throws:
IllegalArgumentException
- if id is zero or negative- See Also:
-
setCourseID
public void setCourseID(int id) Updates the Flight Academy Course..- Parameters:
id
- the Course database ID- Throws:
IllegalArgumentException
- if id is zero or negative- See Also:
-
setStatus
public void setStatus(int status) Updates the Session's status.- Parameters:
status
- the status code- Throws:
IllegalStateException
- if status is negative or invalid- See Also:
-
setNoShow
public void setNoShow(boolean noShow) Marks the Pilot as a "no-show".- Parameters:
noShow
- TRUE if the Pilot did not show up, otherwise FALSE- See Also:
-
setStartTime
Updates the start time for this Session.- Parameters:
dt
- the start date/time- See Also:
-
setEndTime
Updates the end time for this Session.- Parameters:
dt
- the end date/time- Throws:
IllegalArgumentException
- if dt is before startDate- See Also:
-
setComments
Updates the remarks for this Session.- Parameters:
txt
- the remarks- See Also:
-
compareTo
Comapres two sessions by comparing their start times.- Specified by:
compareTo
in interfaceComparable<Object>
- Overrides:
compareTo
in classDatabaseBean
- See Also:
-
getRowClassName
Returns the CSS row class name if displayed in a view table.- Specified by:
getRowClassName
in interfaceViewEntry
- Returns:
- the CSS class name
-
getDate
Returns the date if rendered within a calendar view.- Specified by:
getDate
in interfaceCalendarEntry
- Returns:
- the start date/time
- See Also:
-