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

public class InstructionFlight extends DatabaseBean implements Instruction, InstructorBean
A bean to track Flight Academy Instruction Flights.
Since:
1.0
Version:
7.0
Author:
Luke
See Also:
  • Constructor Details

    • InstructionFlight

      public InstructionFlight(int instructorID, int courseID)
      Creates a new Instruction Log entry.
      Parameters:
      instructorID - the Instructor pilot's database ID
      courseID - the Course's database ID
      Throws:
      IllegalArgumentException - if instructorID or courseID are zero or negative
  • Method Details

    • getEquipmentType

      public String getEquipmentType()
      Returns the aircraft type used for this flight.
      Returns:
      the equipment type
      See Also:
    • getComments

      public String getComments()
      Returns any comments about this flight.
      Specified by:
      getComments in interface Instruction
      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 interface Instruction
      Returns:
      the Course's database ID
      See Also:
    • getCourseName

      public String 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 interface Instruction
      Specified by:
      getInstructorID in interface InstructorBean
      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 interface Instruction
      Returns:
      the Pilot's database ID
      See Also:
    • getDate

      public Instant getDate()
      Returns the date this flight was started.
      Specified by:
      getDate in interface CalendarEntry
      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

      public void setEquipmentType(String eqType)
      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

      public void setCourseName(String name)
      Updates the the Flight Academy course associated with this flight.
      Parameters:
      name - the Course's name
      See Also:
    • setComments

      public void setComments(String comments)
      Updates this flight's comments.
      Parameters:
      comments - the updated comments
      See Also:
    • setDate

      public void setDate(Instant dt)
      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: