Class TransferRequest
java.lang.Object
org.deltava.beans.DatabaseBean
org.deltava.beans.hr.TransferRequest
- All Implemented Interfaces:
Serializable, Comparable<Object>, IDBean, ViewEntry, Cacheable
A class to store Equipment Program transfer requests. Since a checkride may be required for switches to
additional equipment programs, this bean may also be used to track check ride workflows.
- Since:
- 1.0
- Version:
- 8.6
- Author:
- Luke
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCheckRideID(int id) Updates the database ID of the assigned Check Ride.intCompares two Transfer Requests by comparing their dates.Returns the preferred aircraft type for the Check Ride.Returns the database IDs of all check rides associated with this Transfer Request.booleanReturns whether the associated Check Ride has been submitted.getDate()Returns the creation date of this Transfer Request.Returns the Equipment Program for this Transfer Request.intReturns the database ID of the latest assigned Check Ride.booleanReturns if this Transfer Request is for an additional rating only.Returns the CSS class name used to display this in a view table.Returns the Pilot's preferred Simulator.Returns the status of this Transfer Request.voidsetAircraftType(String acType) Updates the preferr aircraft type to use for the check ride.voidsetCheckRideSubmitted(boolean isSubmitted) Updates whether the associated Check Ride has been submittedvoidUpdates the creation date of this Transfer Request.voidsetRatingOnly(boolean ratingOnly) Updates if this Transfer Request is for an additional rating, instead of a program switch.voidsetSimulator(Simulator sim) Updates the Pilot's preferred simulator.voidsetStatus(TransferStatus status) Updates the status of this Transfer Request.Methods inherited from class DatabaseBean
cacheKey, equals, getHexID, getID, hashCode, setID, validateID, validateID
-
Constructor Details
-
TransferRequest
Create a new Transfer Request.- Parameters:
pilotID- the Pilot's Database IDeqType- the Equipment Program to transfer to- Throws:
IllegalArgumentException- if pilotID is zero or negativeNullPointerException- if eqType is null
-
-
Method Details
-
getAircraftType
Returns the preferred aircraft type for the Check Ride.- Returns:
- the aircraft type
-
getEquipmentType
Returns the Equipment Program for this Transfer Request.- Returns:
- the equipment program name
-
getDate
Returns the creation date of this Transfer Request.- Returns:
- the date/time this request was created
- See Also:
-
getLatestCheckRideID
public int getLatestCheckRideID()Returns the database ID of the latest assigned Check Ride.- Returns:
- the database ID of the assigned Check Ride, or zero if none assigned
- See Also:
-
getCheckRideIDs
Returns the database IDs of all check rides associated with this Transfer Request.- Returns:
- a Collection of database IDs
- See Also:
-
getStatus
Returns the status of this Transfer Request.- Returns:
- the status code
- See Also:
-
getCheckRideSubmitted
public boolean getCheckRideSubmitted()Returns whether the associated Check Ride has been submitted.- Returns:
- TRUE if the Check Ride was submitted or graded, otherwise FALSE
- See Also:
-
getRatingOnly
public boolean getRatingOnly()Returns if this Transfer Request is for an additional rating only.- Returns:
- TRUE if the rating is requested, not a program switch, otherwise FALSE
- See Also:
-
getSimulator
Returns the Pilot's preferred Simulator.- Returns:
- a Simulator enum
- See Also:
-
setDate
Updates the creation date of this Transfer Request.- Parameters:
dt- the date/time this request was created- See Also:
-
setAircraftType
Updates the preferr aircraft type to use for the check ride.- Parameters:
acType- the aircraft type
-
addCheckRideID
public void addCheckRideID(int id) Updates the database ID of the assigned Check Ride.- Parameters:
id- the Check Ride's database ID- Throws:
IllegalArgumentException- if id is negative- See Also:
-
setCheckRideSubmitted
public void setCheckRideSubmitted(boolean isSubmitted) Updates whether the associated Check Ride has been submitted- Parameters:
isSubmitted- TRUE if the Check Ride was submitted/graded, otherwise FALSE- Throws:
IllegalStateException- if no Check Ride ID was supplied- See Also:
-
setStatus
Updates the status of this Transfer Request.- Parameters:
status- the new TransferStatus- See Also:
-
setRatingOnly
public void setRatingOnly(boolean ratingOnly) Updates if this Transfer Request is for an additional rating, instead of a program switch.- Parameters:
ratingOnly- TRUE if an additional rating only, otherwise FALSE- See Also:
-
setSimulator
Updates the Pilot's preferred simulator.- Parameters:
sim- a Simulator- See Also:
-
compareTo
Compares two Transfer Requests by comparing their dates.- Specified by:
compareToin interfaceComparable<Object>- Overrides:
compareToin classDatabaseBean- See Also:
-
getRowClassName
Returns the CSS class name used to display this in a view table.- Specified by:
getRowClassNamein interfaceViewEntry- Returns:
- the CSS class name
-