Class CheckRide

All Implemented Interfaces:
Serializable, Comparable<Object>, AuthoredBean, IDBean, ViewEntry, Cacheable

public class CheckRide extends Test
A class to store Check Ride data.
Since:
1.0
Version:
11.0
Author:
Luke
See Also:
  • Constructor Details

    • CheckRide

      public CheckRide(String name)
      Creates a new Check Ride/Video.
      Parameters:
      name - the name of the checkride
      See Also:
  • Method Details

    • getFlightID

      public int getFlightID()
      Returns the ACARS Flight ID for this checkride.
      Returns:
      the ACARS Flight ID
      See Also:
    • getCourseID

      public int getCourseID()
      Returns the Flight Academy Course this CheckRide is associated with.
      Returns:
      the Course's database ID, or zero if no Course
      See Also:
    • getScore

      public final int getScore()
      Returns the score for this Check Ride.
      Overrides:
      getScore in class Test
      Returns:
      1 if passed, otherwise 0
      See Also:
    • getAircraftType

      public String getAircraftType()
      Returns the aircraft type used in this Check Ride.
      Returns:
      the aircraft type
      See Also:
    • getEquipmentType

      public String getEquipmentType()
      Returns the equipment type for the check ride.
      Returns:
      the equipment type
      See Also:
    • getExpirationDate

      public Instant getExpirationDate()
      Returns the expiration of this check ride.
      Returns:
      the expiry date/time, or null if never
      See Also:
    • getSize

      public int getSize()
      Returns the size of the Test. Not Implemented
      Specified by:
      getSize in class Test
      Returns:
      1
    • getIndex

      public int getIndex()
      Returns the Check Ride index for a Flight Academy course.
      Returns:
      the Check Ride index
    • getType

      public RideType getType()
      Returns the Check Ride type.
      Returns:
      the RideType
      See Also:
    • setFlightID

      public void setFlightID(int id)
      Sets the ACARS Flight ID for this Check Ride.
      Parameters:
      id - the ACARS Flight ID
      Throws:
      IllegalArgumentException - if id is negative
      See Also:
    • setCourseID

      public void setCourseID(int id)
      Updates the Flight Academy Course ID for this Check Ride.
      Parameters:
      id - the Flight Academy Course database ID
      Throws:
      IllegalStateException - if this is not a Flight Academy Check Ride
      IllegalArgumentException - if id is negative
      See Also:
    • setSize

      public void setSize(int size)
      Sets the size of the Test. NOT IMPLEMENTED
      Specified by:
      setSize in class Test
      Parameters:
      size - the number of questions
      Throws:
      UnsupportedOperationException
    • setScore

      public void setScore(boolean passFail)
      Sets the score for the Check Ride.
      Parameters:
      passFail - TRUE if a pass (1), otherwise FALSE (0) for a fail
      See Also:
    • setScore

      public final void setScore(int score)
      Sets the score for the Check ride.
      Overrides:
      setScore in class Test
      Parameters:
      score - the score, either 0 or 1 for pass or fail
      Throws:
      IllegalArgumentException - if the score is not 0 or 1
      See Also:
    • setAircraftType

      public void setAircraftType(String acType)
      Sets the aircraft type used for this Check Ride.
      Parameters:
      acType - the aircraft type
      See Also:
    • setEquipmentType

      public void setEquipmentType(String eqType)
      Sets the equipment program for this Check Ride.
      Parameters:
      eqType - the equipment program.
      See Also:
    • setEquipmentType

      public void setEquipmentType(EquipmentType eq)
      Sets the equipment program and stage for this Check Ride.
      Parameters:
      eq - the Equipment Program bean
      See Also:
    • setExpirationDate

      public void setExpirationDate(Instant dt)
      Sets the expiration date for this Check Ride.
      Parameters:
      dt - the expiration date/time, or null if never
      See Also:
    • setType

      public void setType(RideType rt)
      Sets the Check Ride Type.
      Parameters:
      rt - the RideType
      See Also:
    • setAcademy

      public void setAcademy(boolean academy)
      Marks this Test as part of the Flight Academy.
      Overrides:
      setAcademy in class Test
      Parameters:
      academy - TRUE if the Test is part of the Flight Academy, otherwise FALSE
      See Also:
    • getRowClassName

      public String getRowClassName()
      Returns the CSS class name for a view table row.
      Returns:
      the CSS class name