Class CheckRide
java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.testing.Test
org.deltava.beans.testing.CheckRide
- All Implemented Interfaces:
Serializable, Comparable<Object>, AuthoredBean, IDBean, ViewEntry, Cacheable
A class to store Check Ride data.
- Since:
- 1.0
- Version:
- 11.0
- Author:
- Luke
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the aircraft type used in this Check Ride.intReturns the Flight Academy Course this CheckRide is associated with.Returns the equipment type for the check ride.Returns the expiration of this check ride.intReturns the ACARS Flight ID for this checkride.intgetIndex()Returns the Check Ride index for a Flight Academy course.Returns the CSS class name for a view table row.final intgetScore()Returns the score for this Check Ride.intgetSize()Returns the size of the Test.getType()Returns the Check Ride type.voidsetAcademy(boolean academy) Marks this Test as part of the Flight Academy.voidsetAircraftType(String acType) Sets the aircraft type used for this Check Ride.voidsetCourseID(int id) Updates the Flight Academy Course ID for this Check Ride.voidsetEquipmentType(String eqType) Sets the equipment program for this Check Ride.voidSets the equipment program and stage for this Check Ride.voidSets the expiration date for this Check Ride.voidsetFlightID(int id) Sets the ACARS Flight ID for this Check Ride.voidsetScore(boolean passFail) Sets the score for the Check Ride.final voidsetScore(int score) Sets the score for the Check ride.voidsetSize(int size) Sets the size of the Test.voidSets the Check Ride Type.Methods inherited from class Test
compareTo, getAcademy, getAuthorID, getComments, getDate, getFirstName, getLastName, getName, getOwner, getPassFail, getScoredOn, getScorerID, getStage, getStatus, getSubmittedOn, setAuthorID, setComments, setDate, setFirstName, setLastName, setOwner, setPassFail, setScoredOn, setScorerID, setStage, setStatus, setSubmittedOnModifier and TypeMethodDescriptionintbooleanReturns whether this Test is part of the Flight Academy.intReturns the Author of this bean.Returns the Examination comments.getDate()Returns the date this Examination was created/performed on.Returns the Pilot's first (given) name.Returns the Pilot's last (family) name.getName()Returns the name of the examination/video.getOwner()Returns the owner Airline of this Examination.booleanReturns if the Pilot passed or failed this examinationReturns the date/time this Examination was scored onintReturns the Scorer's Database ID.intgetStage()Returns the stage level of this examination/checkride.Returns the status of this examination.Returns the date/time this Examination was submitted on.voidsetAuthorID(int id) Updates the author of this bean.voidsetComments(String comments) Updates the Examination comments.voidUpdates this Examination's date.voidsetFirstName(String name) Sets the first (given) name of the Pilot.voidsetLastName(String name) Sets the last (family) name of the Pilot.voidUpdates this Examination's owner Airline.voidsetPassFail(boolean passFail) Sets whether this Pilot passed or failed the examination.voidsetScoredOn(Instant dt) Updates this Examination's "scored on" date.voidsetScorerID(int id) Updates the database ID for the Pilot who scored this exam.voidsetStage(int stage) Sets the stage level for this Examination.voidSets the status for this Test.voidUpdates this Examination's submission date.Methods inherited from class DatabaseBean
cacheKey, equals, getHexID, getID, hashCode, setID, validateID, validateIDModifier and TypeMethodDescriptioncacheKey()Returns the cache key for this object.booleangetHexID()Returns the hexadecimal database ID of this object.intgetID()Returns the database ID of this object.inthashCode()voidsetID(int id) Update the database row ID of this bean.static voidvalidateID(int oldID, int newID) Validates a database ID.static voidvalidateID(int oldID, int newID, boolean allowZero) Validates a database ID.
-
Constructor Details
-
CheckRide
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
-
getAircraftType
Returns the aircraft type used in this Check Ride.- Returns:
- the aircraft type
- See Also:
-
getEquipmentType
Returns the equipment type for the check ride.- Returns:
- the equipment type
- See Also:
-
getExpirationDate
Returns the expiration of this check ride.- Returns:
- the expiry date/time, or null if never
- See Also:
-
getSize
-
getIndex
public int getIndex()Returns the Check Ride index for a Flight Academy course.- Returns:
- the Check Ride index
-
getType
-
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 RideIllegalArgumentException- if id is negative- See Also:
-
setSize
public void setSize(int size) Sets the size of the Test. NOT IMPLEMENTED- Specified by:
setSizein classTest- 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:
setScorein classTest- 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
Sets the aircraft type used for this Check Ride.- Parameters:
acType- the aircraft type- See Also:
-
setEquipmentType
Sets the equipment program for this Check Ride.- Parameters:
eqType- the equipment program.- See Also:
-
setEquipmentType
Sets the equipment program and stage for this Check Ride.- Parameters:
eq- the Equipment Program bean- See Also:
-
setExpirationDate
Sets the expiration date for this Check Ride.- Parameters:
dt- the expiration date/time, or null if never- See Also:
-
setType
-
setAcademy
public void setAcademy(boolean academy) Marks this Test as part of the Flight Academy.- Overrides:
setAcademyin classTest- Parameters:
academy- TRUE if the Test is part of the Flight Academy, otherwise FALSE- See Also:
-
getRowClassName
Returns the CSS class name for a view table row.- Returns:
- the CSS class name
-