Class Certification
java.lang.Object
org.deltava.beans.academy.Certification
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparable<Certification>
,Auditable
,ComboAlias
,ViewEntry
public class Certification
extends Object
implements ComboAlias, ViewEntry, Auditable, Comparable<Certification>
A bean to store Flight Academy certification data.
- Since:
- 1.0
- Version:
- 10.1
- Author:
- Luke
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an eligible virtual airline to this Certification.void
addExamName
(String name) Adds an associated Examination name.void
Adds a requirement for this Certification.void
Adds an eligible Check Ride equipment type.void
Adds a security role allowed to enroll for this Certification.int
boolean
Returns whether the Certification is active.Returns the eligible virtual airlines for this Certification.Returns the object ID for this auditable object.boolean
Returns whether students are automatically enrolled in this Course.getCode()
Returns the Certification code.Returns the alias to use in the HTML <OPTION> element.Returns the visible name to use in the HTML <OPTION> element.Returns the Certification description and instructions.Returns the equipment program required for pre-requisite flight legs or hours.Returns the Examinations linked with this Certification.int
Returns the number of pre-requisite flight legs or hours required to enroll for this Certification.getName()
Returns the certification name.Returns the Online network that grants a pilot rating when this Certification is completed.Returns the Online network's pilot rating code.Returns the specific Certification pre-requisite.int
Returns the number of Requirements for this Certification.getReqs()
Returns the pre-requisite code.Returns the requirements for this Certification.int
Returns how many Check Rides are required for this Certification.Returns the aircraft type suitable for the Check Ride.getRoles()
Returns the security roles required to enroll for this Certification.Returns the CSS class for this object if rendered in a view table.int
getStage()
Returns the certification stage.boolean
Returns whether the achievement of this Certification is publicly visible.boolean
hasAirline
(String airlineCode) Returns whether this Flight Academy Certification is open to a particular virtual airline.int
hashCode()
void
setActive
(boolean isActive) Updates whether the certification is active.void
setAirlines
(Collection<AirlineInformation> airlines) Assigns eligible virtual airlines to this Certification.void
setAutoEnroll
(boolean autoEnroll) Updates whether students are automatically enrolled in this Course.void
Updates the Certification code.void
setDescription
(String desc) Updates the certification description/instructions.void
setEquipmentProgram
(String eqProgram) Updates the equipment type program required for pre-requisite flights.void
setExams
(Collection<String> exams) Clears and Updates the list of requirement Examinations.void
setFlightCount
(int cnt) Updates the number of flight legs or hours required to enroll for this Certification.void
Updates the Certification name.void
setNetwork
(OnlineNetwork net) Updates the online network that this Ceritification will grant a Pilot Rating for.void
setNetworkRatingCode
(String code) Updates the rating code used by the online network.void
setReqCert
(String certCode) Sets the pre-requisite certification (if any).void
setReqCount
(int count) Updates the number of requirements for this Certification.void
setReqs
(Prerequisite req) Updates the Course prerequisite.void
Clears and updates the requirements for this Certification.void
setRideCount
(int cr) Updates the number of Check Rides required for this Certification.void
setRideEQ
(Collection<String> eqTypes) Clears and sets the Check Ride equipment types.void
setRoles
(Collection<String> roleNames) Clears and Updates the list of roles required to enroll.void
setStage
(int stage) Updates the stage number.void
setVisible
(boolean isVisible) Updates whether this achievement of this certification is publicly visible.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.deltava.beans.Auditable
getAuditType, isCrossApp
-
Constructor Details
-
Certification
Creates a new Certification bean.- Parameters:
name
- the name- Throws:
NullPointerException
- if name is null
-
-
Method Details
-
getName
-
getCode
-
getActive
public boolean getActive()Returns whether the Certification is active.- Returns:
- TRUE if it is active, otherwise FALSE
- See Also:
-
getVisible
public boolean getVisible()Returns whether the achievement of this Certification is publicly visible.- Returns:
- TRUE if visible, otherwise FALSE
- See Also:
-
getAutoEnroll
public boolean getAutoEnroll()Returns whether students are automatically enrolled in this Course.- Returns:
- TRUE if students are automatically enrolled, otherwise FALSE
- See Also:
-
getRideCount
public int getRideCount()Returns how many Check Rides are required for this Certification.- Returns:
- the number of Check Rides required
- See Also:
-
getStage
public int getStage()Returns the certification stage.- Returns:
- the stage number
- See Also:
-
getReqs
Returns the pre-requisite code.- Returns:
- the pre-requisite code
- See Also:
-
getReqCert
Returns the specific Certification pre-requisite.- Returns:
- the Certification code, or null if none
- See Also:
-
getReqCount
public int getReqCount()Returns the number of Requirements for this Certification.- Returns:
- the number of requirements
- See Also:
-
getRequirements
Returns the requirements for this Certification.- Returns:
- a Collection of CertificationRequirement beans
- See Also:
-
getAirlines
Returns the eligible virtual airlines for this Certification.- Returns:
- a Collection of AirlineInformation beans
- See Also:
-
getExamNames
Returns the Examinations linked with this Certification.- Returns:
- a Collection of Examination names
- See Also:
-
getRideEQ
Returns the aircraft type suitable for the Check Ride.- Returns:
- a Collection of equipment types, or empty for any
- See Also:
-
getRoles
Returns the security roles required to enroll for this Certification.- Returns:
- a Collection of role names
- See Also:
-
getEquipmentProgram
Returns the equipment program required for pre-requisite flight legs or hours.- Returns:
- the equipment type, or null if none or any
- See Also:
-
getFlightCount
public int getFlightCount()Returns the number of pre-requisite flight legs or hours required to enroll for this Certification.- Returns:
- the number of legs or hours
- See Also:
-
getDescription
Returns the Certification description and instructions.- Returns:
- the description
-
getNetwork
Returns the Online network that grants a pilot rating when this Certification is completed.- Returns:
- the OnlineNetwork, or null if none
-
getNetworkRatingCode
Returns the Online network's pilot rating code.- Returns:
- the code
-
hasAirline
Returns whether this Flight Academy Certification is open to a particular virtual airline.- Parameters:
airlineCode
- the virtual airline code.- Returns:
- TRUE if the Certification is open to this airline, otherwise FALSE
- See Also:
-
addAirline
Adds an eligible virtual airline to this Certification.- Parameters:
ai
- an AirlineInformation bean- See Also:
-
setAirlines
Assigns eligible virtual airlines to this Certification.- Parameters:
airlines
- a Collection of AirlineInformation beans- See Also:
-
addRequirement
Adds a requirement for this Certification.- Parameters:
req
- the requirement bean- See Also:
-
setRequirements
Clears and updates the requirements for this Certification.- Parameters:
reqs
- a Collection of CertificationRequirement beans- See Also:
-
setReqCount
public void setReqCount(int count) Updates the number of requirements for this Certification.- Parameters:
count
- the number of requirements- Throws:
IllegalStateException
- if requirement text already loaded- See Also:
-
setCode
Updates the Certification code.- Parameters:
code
- the code- Throws:
NullPointerException
- if code is null- See Also:
-
addExamName
Adds an associated Examination name.- Parameters:
name
- the Examination name- See Also:
-
setExams
Clears and Updates the list of requirement Examinations.- Parameters:
exams
- a Collecton of Examination names- See Also:
-
addRideEQ
Adds an eligible Check Ride equipment type.- Parameters:
eqType
- the equipment type- See Also:
-
setRideEQ
Clears and sets the Check Ride equipment types.- Parameters:
eqTypes
- a Collection of equipment types- See Also:
-
addRole
Adds a security role allowed to enroll for this Certification.- Parameters:
roleName
- a security role name- Throws:
NullPointerException
- if roleName is null- See Also:
-
setRoles
Clears and Updates the list of roles required to enroll.- Parameters:
roleNames
- a Collecton of security role names- See Also:
-
setStage
public void setStage(int stage) Updates the stage number.- Parameters:
stage
- the stage- See Also:
-
setActive
public void setActive(boolean isActive) Updates whether the certification is active.- Parameters:
isActive
- TRUE if it is active, otherwise FALSE- See Also:
-
setVisible
public void setVisible(boolean isVisible) Updates whether this achievement of this certification is publicly visible.- Parameters:
isVisible
- TRUE if visible, otherwise FALSE- See Also:
-
setAutoEnroll
public void setAutoEnroll(boolean autoEnroll) Updates whether students are automatically enrolled in this Course.- Parameters:
autoEnroll
- TRUE if students are automatically enrolled, otherwise FALSE- See Also:
-
setRideCount
public void setRideCount(int cr) Updates the number of Check Rides required for this Certification.- Parameters:
cr
- the number of Check Rides required- See Also:
-
setName
Updates the Certification name.- Parameters:
name
- the name- Throws:
NullPointerException
- if name is null- See Also:
-
setReqs
Updates the Course prerequisite.- Parameters:
req
- the Prerequisite- See Also:
-
setReqCert
Sets the pre-requisite certification (if any).- Parameters:
certCode
- the pre-requisite Certification code- Throws:
IllegalStateException
- if getReqs() != REQ_SPECIFIC
-
setEquipmentProgram
Updates the equipment type program required for pre-requisite flights.- Parameters:
eqProgram
- the equipment program name, or null for none or any- See Also:
-
setFlightCount
public void setFlightCount(int cnt) Updates the number of flight legs or hours required to enroll for this Certification.- Parameters:
cnt
- the number of legs or hours- See Also:
-
setDescription
Updates the certification description/instructions.- Parameters:
desc
- the description
-
setNetwork
Updates the online network that this Ceritification will grant a Pilot Rating for.- Parameters:
net
- the OnlineNetwork, or null if none
-
setNetworkRatingCode
Updates the rating code used by the online network.- Parameters:
code
- the rating code
-
getComboName
Description copied from interface:ComboAlias
Returns the visible name to use in the HTML <OPTION> element.- Specified by:
getComboName
in interfaceComboAlias
- Returns:
- The visible name for this entry
-
getComboAlias
Description copied from interface:ComboAlias
Returns the alias to use in the HTML <OPTION> element.- Specified by:
getComboAlias
in interfaceComboAlias
- Returns:
- The alias for this entry
-
getRowClassName
Description copied from interface:ViewEntry
Returns the CSS class for this object if rendered in a view table.- Specified by:
getRowClassName
in interfaceViewEntry
- Returns:
- the CSS class name, or NULL if none
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Certification>
-
hashCode
-
toString
-
getAuditID
Description copied from interface:Auditable
Returns the object ID for this auditable object.- Specified by:
getAuditID
in interfaceAuditable
- Returns:
- the ID
-