Class ExamProfile
java.lang.Object
org.deltava.beans.testing.ExamProfile
- All Implemented Interfaces:
Serializable, Cloneable, Comparable<ExamProfile>, Auditable, PassStatistics, ViewEntry, Cacheable
public class ExamProfile
extends Object
implements Comparable<ExamProfile>, PassStatistics, Auditable, Cacheable, ViewEntry
A class to store Examination profile information.
- Since:
- 1.0
- Version:
- 9.1
- Author:
- Luke
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidMakes this Examination visible to an Airline.voidaddScorerID(int id) Adds a user who can grade this Examination.cacheKey()Returns the cache key for this object.intcompareTo(ExamProfile e2) booleanReturns whether this Examination is part of the Flight Academy.booleanReturns whether this Examination is avialable to be taken.Returns the Airlines that can access this Examination.Returns the object ID for this auditable object.Returns the equipment program required to take this Examination.intReturns the minimum stage required in order to take this Examination.getName()Returns the Examination Name.booleanReturns whether a notification message should be sent on submission.getOwner()Returns the Owner Airline for this Examination.intReturns the number of test passes or correct answers.intReturns the minimum percentage required to pass this Examination.intReturns the number of questions in this Examination's question pool.Returns the CSS class for this object if rendered in a view table.Returns the database IDs of all users who can grade this Examination.intgetSize()Returns the number of questions in this Examination.intgetStage()Returns the stage for this Examination.intgetTime()Returns the time allowed to complete this Examination.intgetTotal()Returns the total number of invocations.inthashCode()voidsetAcademy(boolean academy) Marks this Examination as part of the Flight Academy.voidsetActive(boolean active) Marks this Examination as available to be taken.voidsetAirlines(Collection<AirlineInformation> airlines) Sets the Airlines that this Examination will be visible to.voidsetEquipmentType(String eqType) Sets the equipment program required to take this Examination.voidsetMinStage(int stage) Sets the minimum stage required to take this Examination.voidUpdates the Examination name.voidsetNotify(boolean doNotify) Sets a notification on Examination submission.voidSets which airline is the owner of this Examination.voidsetPassCount(int cnt) Updates the total numebr of times this Examination has been passed.voidsetPassScore(int score) Sets the passing score for this Examination as a percentage.voidsetQuestionPoolSize(int cnt) Updates the number of Exam Questions in this Examination's question pool.voidsetSize(int size) Sets the number of questions in this Examination.voidsetStage(int stage) Sets the stage for this Examination.voidsetTime(int time) Sets the time required to complete this Examination.voidsetTotal(int total) Updates the total number of times this Examination has been taken.toString()Methods inherited from class Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface Auditable
getAuditType, isCrossApp
-
Constructor Details
-
ExamProfile
Creates a new Examination profile.- Parameters:
name- the name of the examination- Throws:
NullPointerException- if name is null- See Also:
-
-
Method Details
-
getName
-
getEquipmentType
Returns the equipment program required to take this Examination.- Returns:
- the equipment program name
- See Also:
-
getStage
public int getStage()Returns the stage for this Examination.- Returns:
- the stage
- See Also:
-
getMinStage
public int getMinStage()Returns the minimum stage required in order to take this Examination.- Returns:
- the minimum stage
- See Also:
-
getSize
public int getSize()Returns the number of questions in this Examination.- Returns:
- the number of questions
- See Also:
-
getPassScore
public int getPassScore()Returns the minimum percentage required to pass this Examination.- Returns:
- the minimum percentage multiplied by 100
- See Also:
-
getTime
public int getTime()Returns the time allowed to complete this Examination.- Returns:
- the time in minutes
- See Also:
-
getActive
public boolean getActive()Returns whether this Examination is avialable to be taken.- Returns:
- TRUE if the Examination is active, otherwise FALSE
- See Also:
-
getAcademy
public boolean getAcademy()Returns whether this Examination is part of the Flight Academy.- Returns:
- TRUE if the Examination is part of the Academy, otherwise FALSE
- See Also:
-
getNotify
public boolean getNotify()Returns whether a notification message should be sent on submission.- Returns:
- TRUE if a message should be sent, otherwise FALSE
- See Also:
-
getTotal
public int getTotal()Description copied from interface:PassStatisticsReturns the total number of invocations.- Specified by:
getTotalin interfacePassStatistics- Returns:
- the number of invocations
-
getPassCount
public int getPassCount()Description copied from interface:PassStatisticsReturns the number of test passes or correct answers.- Specified by:
getPassCountin interfacePassStatistics- Returns:
- the number of successes
-
getQuestionPoolSize
public int getQuestionPoolSize()Returns the number of questions in this Examination's question pool.- Returns:
- the number of questions
- See Also:
-
getOwner
Returns the Owner Airline for this Examination.- Returns:
- an AirlineInformation bean
- See Also:
-
getAirlines
Returns the Airlines that can access this Examination.- Returns:
- a Collection of AirlineInformation beans
- See Also:
-
getScorerIDs
Returns the database IDs of all users who can grade this Examination.- Returns:
- a Collection of database IDs
- See Also:
-
setStage
public void setStage(int stage) Sets the stage for this Examination.- Parameters:
stage- the stage number- See Also:
-
setName
Updates the Examination name.- Parameters:
name- the new name- Throws:
NullPointerException- if name is null- See Also:
-
setEquipmentType
Sets the equipment program required to take this Examination.- Parameters:
eqType- the equipment program name- See Also:
-
setMinStage
public void setMinStage(int stage) Sets the minimum stage required to take this Examination.- Parameters:
stage- the stage number- See Also:
-
setPassScore
public void setPassScore(int score) Sets the passing score for this Examination as a percentage.- Parameters:
score- the passing score, from 0 to 100- Throws:
IllegalArgumentException- if score is negative or > 100- See Also:
-
setSize
public void setSize(int size) Sets the number of questions in this Examination.- Parameters:
size- the number of questions- See Also:
-
setTime
public void setTime(int time) Sets the time required to complete this Examination.- Parameters:
time- the time in minutes- Throws:
IllegalArgumentException- if time is zero or negative- See Also:
-
setActive
public void setActive(boolean active) Marks this Examination as available to be taken.- Parameters:
active- TRUE if the Examination is active, otherwise FALSE- See Also:
-
setAcademy
public void setAcademy(boolean academy) Marks this Examination as part of the Flight Academy.- Parameters:
academy- TRUE if the Examination is part of the Flight Academy, otherwise FALSE- See Also:
-
setNotify
public void setNotify(boolean doNotify) Sets a notification on Examination submission.- Parameters:
doNotify- TRUE if a notification should be sent, otherwise FALSE- See Also:
-
setTotal
public void setTotal(int total) Updates the total number of times this Examination has been taken.- Parameters:
total- the number of times- See Also:
-
setPassCount
public void setPassCount(int cnt) Updates the total numebr of times this Examination has been passed.- Parameters:
cnt- the number of passed Examinations- See Also:
-
setQuestionPoolSize
public void setQuestionPoolSize(int cnt) Updates the number of Exam Questions in this Examination's question pool.- Parameters:
cnt- the number of questions- See Also:
-
setOwner
Sets which airline is the owner of this Examination.- Parameters:
ai- the AirlineInformation bean for the owner airline- See Also:
-
addAirline
Makes this Examination visible to an Airline.- Parameters:
ai- the AirlineInformation bean- See Also:
-
setAirlines
Sets the Airlines that this Examination will be visible to.- Parameters:
airlines- a Collection of AirlineInformation beans
-
addScorerID
public void addScorerID(int id) Adds a user who can grade this Examination.- Parameters:
id- the user's database ID- See Also:
-
compareTo
- Specified by:
compareToin interfaceComparable<ExamProfile>
-
cacheKey
-
hashCode
-
toString
-
getRowClassName
Description copied from interface:ViewEntryReturns the CSS class for this object if rendered in a view table.- Specified by:
getRowClassNamein interfaceViewEntry- Returns:
- the CSS class name, or NULL if none
-
getAuditID
Description copied from interface:AuditableReturns the object ID for this auditable object.- Specified by:
getAuditIDin interfaceAuditable- Returns:
- the ID
-