Class Input
java.lang.Object
ch.tocco.nice2.optional.qualification.impl.util.entities.AbstractInstance
ch.tocco.nice2.optional.qualification.impl.util.entities.Input
- All Implemented Interfaces:
Instance
-
Field Summary
Fields inherited from class ch.tocco.nice2.optional.qualification.impl.util.entities.AbstractInstance
context, delegate, qualificationService
-
Constructor Summary
ConstructorDescriptionInput
(Entity delegate, QualificationService qualificationService, Context context) -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
void
evaluate
(Collection<Exam> exams, EvaluationFactory evaluationFactory) Returns allExam
s related to thisInput
even if they are defined as inactive by theirExam.FIELD_NR
exceeding theInput
'snumRatings
value.@Nullable InputData
@Nullable EvaluationNode
static List
<AbstractInputType.ExamRecord> getExamRecords
(List<Exam> exams) Transforms a collection ofExam
s into a collection ofAbstractInputType.ExamRecord
s.getExams
(int limit) Returns allExam
s related to thisInput
not exceeding the given limit, even if they are defined as inactive by theirExam.FIELD_NR
exceeding theInput
'snumRatings
value.getInputData
(boolean updateParticipants) Get all Input_data entities for this Input.getNode()
getNode
(EvaluationNode parent) @Nullable Integer
int
@Nullable InputData
getOrCreateData
(Entity participant) @Nullable Evaluation
@Nullable Entity
@Nullable org.joda.time.DateTime
@Nullable org.joda.time.DateTime
getRatingData
(Entity user) @Nullable EvaluationNode
get a string that uniquely identifies this instance.@Nullable Entity
boolean
boolean
boolean
void
setGradeAvg
(@Nullable BigDecimal avg) void
setGradeCount
(int count) void
setGradeMax
(@Nullable BigDecimal max) void
setGradeMin
(@Nullable BigDecimal min) void
setNumRatings
(int numRatings) void
setPointsAvg
(@Nullable BigDecimal avg) void
setPointsCount
(int count) void
setPointsMax
(@Nullable BigDecimal max) void
setPointsMin
(@Nullable BigDecimal min) toString()
Methods inherited from class ch.tocco.nice2.optional.qualification.impl.util.entities.AbstractInstance
getAllChildren, getChildrenMap, getColumnHeader, getDate, getDelegate, getEvents, getGradeAvg, getGradeMax, getGradeMin, getLabel, getParticipantRegistrations, getParticipantRegistrations, getParticipants, getParticipants, getQualificationService, getRootEvents, getRounding, getShort, getTooltip, isPublished
-
Constructor Details
-
Input
-
-
Method Details
-
getInputStatus
-
isFinishable
public boolean isFinishable() -
getNode
- Specified by:
getNode
in classAbstractInstance
-
getNode
- Specified by:
getNode
in classAbstractInstance
-
getUniqueKey
Description copied from interface:Instance
get a string that uniquely identifies this instance. currently, format is Model-Key.- Returns:
- the unique key
-
getGrades
- Specified by:
getGrades
in classAbstractInstance
-
isMandatory
public boolean isMandatory()- Specified by:
isMandatory
in classAbstractInstance
-
getInputData
-
getOrCreateData
- Specified by:
getOrCreateData
in classAbstractInstance
-
getData
- Specified by:
getData
in classAbstractInstance
-
getPublishedFrom
@Nullable public @Nullable org.joda.time.DateTime getPublishedFrom()- Specified by:
getPublishedFrom
in classAbstractInstance
-
getPublishedTo
@Nullable public @Nullable org.joda.time.DateTime getPublishedTo()- Specified by:
getPublishedTo
in classAbstractInstance
-
isVisible
public boolean isVisible()- Specified by:
isVisible
in classAbstractInstance
-
createMissingExams
-
getActiveExams
-
getAllExams
Returns allExam
s related to thisInput
even if they are defined as inactive by theirExam.FIELD_NR
exceeding theInput
'snumRatings
value. -
getExams
Returns allExam
s related to thisInput
not exceeding the given limit, even if they are defined as inactive by theirExam.FIELD_NR
exceeding theInput
'snumRatings
value. -
getExamRecords
Transforms a collection ofExam
s into a collection ofAbstractInputType.ExamRecord
s.- Parameters:
exams
- the collection ofExam
s to be transformed.- Returns:
- the list of
AbstractInputType.ExamRecord
s
-
getInputData
Get all Input_data entities for this Input. The method looks up all Registrations for the linked events and loads or generates Input_data entities for the Users.- Parameters:
updateParticipants
- generate/remove Input_datas for new/invalid participants- Returns:
- the complete Collection of InputData objects
-
getInputDataEntityList
-
getDispensedInputDataEntityList
-
getNumRatings
public int getNumRatings() -
setNumRatings
public void setNumRatings(int numRatings) -
getNumDropGrades
-
getResponsibleUsers
-
aggregateInputData
public void aggregateInputData() -
getThresholdValues
-
getEvaluationNode
-
getRootEvaluationNode
-
setGradeAvg
-
setGradeMin
-
setGradeMax
-
setPointsAvg
-
setPointsMin
-
setPointsMax
-
getParentEvaluation
- Specified by:
getParentEvaluation
in classAbstractInstance
-
getPointsAvg
-
getPointsMin
-
getPointsMax
-
toString
-
evaluate
-
getVisibilityStatus
-
allInputDatasEmpty
public boolean allInputDatasEmpty() -
getRatingData
- Parameters:
user
- a User entity- Returns:
- an optional rating object (type depending on the type of the underlying node)
-
setGradeCount
public void setGradeCount(int count) -
getGradeCount
-
setPointsCount
public void setPointsCount(int count) -
getPointsCount
-
getPointConverterTypeEntity
-