Class InstructionFlight
java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.academy.InstructionFlight
- All Implemented Interfaces:
Serializable,Comparable<Object>,Instruction,InstructorBean,CalendarEntry,IDBean,Cacheable
A bean to track Flight Academy Instruction Flights.
- Since:
- 1.0
- Version:
- 7.0
- Author:
- Luke
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionInstructionFlight(int instructorID, int courseID) Creates a new Instruction Log entry. -
Method Summary
Modifier and TypeMethodDescriptionReturns any comments about this flight.intReturns the database ID of the Flight Academy course associated with this flight.Returns the name of the Flight Academy course associated with this flight.getDate()Returns the date this flight was started.Returns the aircraft type used for this flight.intReturns the database ID of the Instructor Pilot associated with this flight.intReturns the length of the fllight in hours multiplied by ten.intReturns the database ID of the student associated with this flight.voidsetComments(String comments) Updates this flight's comments.voidsetCourseID(int id) Updates the the Flight Academy course associated with this flight.voidsetCourseName(String name) Updates the the Flight Academy course associated with this flight.voidUpdates the date this flight was flown.voidsetEquipmentType(String eqType) Updates the aircraft type used in this flight.voidsetInstructorID(int id) Updates the the Instructor Pilot associated with this flight.voidsetLength(int length) Sets the length of this Flight, in hours multiplied by 10.voidsetPilotID(int id) Updates the Student Pilot associated with this flight.Methods inherited from class org.deltava.beans.DatabaseBean
cacheKey, compareTo, equals, getHexID, getID, hashCode, setID, validateID, validateIDMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareTo
-
Constructor Details
-
InstructionFlight
public InstructionFlight(int instructorID, int courseID) Creates a new Instruction Log entry.- Parameters:
instructorID- the Instructor pilot's database IDcourseID- the Course's database ID- Throws:
IllegalArgumentException- if instructorID or courseID are zero or negative
-
-
Method Details
-
getEquipmentType
Returns the aircraft type used for this flight.- Returns:
- the equipment type
- See Also:
-
getComments
Returns any comments about this flight.- Specified by:
getCommentsin interfaceInstruction- Returns:
- the comments
- See Also:
-
getCourseID
public int getCourseID()Returns the database ID of the Flight Academy course associated with this flight.- Specified by:
getCourseIDin interfaceInstruction- Returns:
- the Course's database ID
- See Also:
-
getCourseName
Returns the name of the Flight Academy course associated with this flight.- Returns:
- the Course's name
- See Also:
-
getInstructorID
public int getInstructorID()Returns the database ID of the Instructor Pilot associated with this flight.- Specified by:
getInstructorIDin interfaceInstruction- Specified by:
getInstructorIDin interfaceInstructorBean- Returns:
- the Pilot's database ID
- See Also:
-
getPilotID
public int getPilotID()Returns the database ID of the student associated with this flight.- Specified by:
getPilotIDin interfaceInstruction- Returns:
- the Pilot's database ID
- See Also:
-
getDate
Returns the date this flight was started.- Specified by:
getDatein interfaceCalendarEntry- Returns:
- the start date/time of this flight
- See Also:
-
getLength
public int getLength()Returns the length of the fllight in hours multiplied by ten. This is done to avoid rounding errors when using a floating point number.- Returns:
- the length of the flight in hours multiplied by ten
- See Also:
-
setEquipmentType
Updates the aircraft type used in this flight.- Parameters:
eqType- the aircraft type- See Also:
-
setCourseID
public void setCourseID(int id) Updates the the Flight Academy course associated with this flight.- Parameters:
id- the Course's database ID- Throws:
IllegalArgumentException- if id is zero or negative- See Also:
-
setInstructorID
public void setInstructorID(int id) Updates the the Instructor Pilot associated with this flight.- Parameters:
id- the Pilot's database ID- Throws:
IllegalArgumentException- if id is zero or negative- See Also:
-
setPilotID
public void setPilotID(int id) Updates the Student Pilot associated with this flight.- Parameters:
id- the Pilot's database ID- Throws:
IllegalArgumentException- if id is zero or negative- See Also:
-
setCourseName
Updates the the Flight Academy course associated with this flight.- Parameters:
name- the Course's name- See Also:
-
setComments
Updates this flight's comments.- Parameters:
comments- the updated comments- See Also:
-
setDate
Updates the date this flight was flown.- Parameters:
dt- the start date/time of this flight- See Also:
-
setLength
public void setLength(int length) Sets the length of this Flight, in hours multiplied by 10.- Parameters:
length- the length of the flight, in hours multiplied by 10- See Also:
-