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 TypeMethodDescriptionvoid
Makes this Examination visible to an Airline.void
addScorerID
(int id) Adds a user who can grade this Examination.cacheKey()
Returns the cache key for this object.int
compareTo
(ExamProfile e2) boolean
Returns whether this Examination is part of the Flight Academy.boolean
Returns 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.int
Returns the minimum stage required in order to take this Examination.getName()
Returns the Examination Name.boolean
Returns whether a notification message should be sent on submission.getOwner()
Returns the Owner Airline for this Examination.int
Returns the number of test passes or correct answers.int
Returns the minimum percentage required to pass this Examination.int
Returns 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.int
getSize()
Returns the number of questions in this Examination.int
getStage()
Returns the stage for this Examination.int
getTime()
Returns the time allowed to complete this Examination.int
getTotal()
Returns the total number of invocations.int
hashCode()
void
setAcademy
(boolean academy) Marks this Examination as part of the Flight Academy.void
setActive
(boolean active) Marks this Examination as available to be taken.void
setAirlines
(Collection<AirlineInformation> airlines) Sets the Airlines that this Examination will be visible to.void
setEquipmentType
(String eqType) Sets the equipment program required to take this Examination.void
setMinStage
(int stage) Sets the minimum stage required to take this Examination.void
Updates the Examination name.void
setNotify
(boolean doNotify) Sets a notification on Examination submission.void
Sets which airline is the owner of this Examination.void
setPassCount
(int cnt) Updates the total numebr of times this Examination has been passed.void
setPassScore
(int score) Sets the passing score for this Examination as a percentage.void
setQuestionPoolSize
(int cnt) Updates the number of Exam Questions in this Examination's question pool.void
setSize
(int size) Sets the number of questions in this Examination.void
setStage
(int stage) Sets the stage for this Examination.void
setTime
(int time) Sets the time required to complete this Examination.void
setTotal
(int total) Updates the total number of times this Examination has been taken.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
-
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:PassStatistics
Returns the total number of invocations.- Specified by:
getTotal
in interfacePassStatistics
- Returns:
- the number of invocations
-
getPassCount
public int getPassCount()Description copied from interface:PassStatistics
Returns the number of test passes or correct answers.- Specified by:
getPassCount
in 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:
compareTo
in interfaceComparable<ExamProfile>
-
cacheKey
-
hashCode
-
toString
-
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
-
getAuditID
Description copied from interface:Auditable
Returns the object ID for this auditable object.- Specified by:
getAuditID
in interfaceAuditable
- Returns:
- the ID
-