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.int
Returns 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.int
Returns the database ID of the Instructor Pilot associated with this flight.int
Returns the length of the fllight in hours multiplied by ten.int
Returns the database ID of the student associated with this flight.void
setComments
(String comments) Updates this flight's comments.void
setCourseID
(int id) Updates the the Flight Academy course associated with this flight.void
setCourseName
(String name) Updates the the Flight Academy course associated with this flight.void
Updates the date this flight was flown.void
setEquipmentType
(String eqType) Updates the aircraft type used in this flight.void
setInstructorID
(int id) Updates the the Instructor Pilot associated with this flight.void
setLength
(int length) Sets the length of this Flight, in hours multiplied by 10.void
setPilotID
(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, validateID
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods 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:
getComments
in 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:
getCourseID
in 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:
getInstructorID
in interfaceInstruction
- Specified by:
getInstructorID
in 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:
getPilotID
in interfaceInstruction
- Returns:
- the Pilot's database ID
- See Also:
-
getDate
Returns the date this flight was started.- Specified by:
getDate
in 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:
-