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 intstatic final intstatic final intstatic final String[] -
Constructor Summary
ConstructorsConstructorDescriptionInstructionSession(int id, int courseID) Creates a new Instruction Session bean. -
Method Summary
Modifier and TypeMethodDescriptionintComapres two sessions by comparing their start times.Returns any remarks about the Session.intReturns the Flight Academy Course ID.getDate()Returns the date if rendered within a calendar view.Returns the end time of this Session.intReturns the Instructor assigned to this Session.getName()Returns the Course name.booleanReturns whether the Pilot missed the Session.intReturns 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.intReturns the status of this Session.Returns the status of this Session.voidsetComments(String txt) Updates the remarks for this Session.voidsetCourseID(int id) Updates the Flight Academy Course..voidsetEndTime(Instant dt) Updates the end time for this Session.voidsetInstructorID(int id) Updates the Instructor assigned to this session.voidUpdates the Course name.voidsetNoShow(boolean noShow) Marks the Pilot as a "no-show".voidsetPilotID(int id) Updates the Pilot participating in this session.voidsetStartTime(Instant dt) Updates the start time for this Session.voidsetStatus(int status) Updates the Session's status.Methods inherited from class DatabaseBean
cacheKey, equals, getHexID, getID, hashCode, setID, validateID, validateIDMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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:
getInstructorIDin interfaceInstruction- Specified by:
getInstructorIDin interfaceInstructorBean- Returns:
- the Instructor's database ID
- See Also:
-
getPilotID
public int getPilotID()Returns the Pilot participating in this Session.- Specified by:
getPilotIDin interfaceInstruction- Returns:
- the Pilot's database ID
- See Also:
-
getCourseID
public int getCourseID()Returns the Flight Academy Course ID.- Specified by:
getCourseIDin 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:
getStartTimein interfaceTimeSpan- Returns:
- the start date/time
- See Also:
-
getEndTime
Returns the end time of this Session.- Specified by:
getEndTimein 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:
getCommentsin 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:
compareToin interfaceComparable<Object>- Overrides:
compareToin classDatabaseBean- See Also:
-
getRowClassName
Returns the CSS row class name if displayed in a view table.- Specified by:
getRowClassNamein interfaceViewEntry- Returns:
- the CSS class name
-
getDate
Returns the date if rendered within a calendar view.- Specified by:
getDatein interfaceCalendarEntry- Returns:
- the start date/time
- See Also:
-