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 AbstractInstance
context, delegate, qualificationService -
Constructor Summary
ConstructorsConstructorDescriptionInput(Entity delegate, QualificationService qualificationService, Context context) -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanvoidevaluate(Collection<Exam> exams, EvaluationFactory evaluationFactory) Returns allExams related to thisInputeven if they are defined as inactive by theirExam.FIELD_NRexceeding theInput'snumRatingsvalue.@Nullable InputData@Nullable EvaluationNodestatic List<AbstractInputType.ExamRecord> getExamRecords(List<Exam> exams) Transforms a collection ofExams into a collection ofAbstractInputType.ExamRecords.getExams(int limit) Returns allExams related to thisInputnot exceeding the given limit, even if they are defined as inactive by theirExam.FIELD_NRexceeding theInput'snumRatingsvalue.getInputData(boolean updateParticipants) Get all Input_data entities for this Input.getNode()getNode(EvaluationNode parent) @Nullable Integerint@Nullable InputDatagetOrCreateData(Entity participant) @Nullable Evaluation@Nullable Entity@Nullable BigDecimal@Nullable BigDecimal@Nullable BigDecimal@Nullable org.joda.time.DateTime@Nullable org.joda.time.DateTimegetRatingData(Entity user) get a string that uniquely identifies this instance.@Nullable EntitybooleanbooleanbooleanvoidsetGradeAvg(@Nullable BigDecimal avg) voidsetGradeCount(int count) voidsetGradeMax(@Nullable BigDecimal max) voidsetGradeMin(@Nullable BigDecimal min) voidsetNumRatings(int numRatings) voidsetPointsAvg(@Nullable BigDecimal avg) voidsetPointsCount(int count) voidsetPointsMax(@Nullable BigDecimal max) voidsetPointsMin(@Nullable BigDecimal min) toString()Methods inherited from class AbstractInstance
getAllChildren, 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:
getNodein classAbstractInstance
-
getNode
- Specified by:
getNodein classAbstractInstance
-
getUniqueKey
-
getGrades
- Specified by:
getGradesin classAbstractInstance
-
isMandatory
public boolean isMandatory()- Specified by:
isMandatoryin classAbstractInstance
-
getInputData
-
getOrCreateData
- Specified by:
getOrCreateDatain classAbstractInstance
-
getData
- Specified by:
getDatain classAbstractInstance
-
getPublishedFrom
@Nullable public @Nullable org.joda.time.DateTime getPublishedFrom()- Specified by:
getPublishedFromin classAbstractInstance
-
getPublishedTo
@Nullable public @Nullable org.joda.time.DateTime getPublishedTo()- Specified by:
getPublishedToin classAbstractInstance
-
isVisible
public boolean isVisible()- Specified by:
isVisiblein classAbstractInstance
-
createMissingExams
-
getActiveExams
-
getAllExams
-
getExams
Returns allExams related to thisInputnot exceeding the given limit, even if they are defined as inactive by theirExam.FIELD_NRexceeding theInput'snumRatingsvalue. -
getExamRecords
Transforms a collection ofExams into a collection ofAbstractInputType.ExamRecords.- Parameters:
exams- the collection ofExams to be transformed.- Returns:
- the list of
AbstractInputType.ExamRecords
-
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
-
setGradeAvg
-
setGradeMin
-
setGradeMax
-
setPointsAvg
-
setPointsMin
-
setPointsMax
-
getParentEvaluation
- Specified by:
getParentEvaluationin classAbstractInstance
-
getPointsAvg
-
getPointsMin
-
getPointsMax
-
toString
-
evaluate
-
getVisibilityStatus
-
allInputDatasEmpty
public boolean allInputDatasEmpty() -
getRatingData
-
setGradeCount
public void setGradeCount(int count) -
getGradeCount
-
setPointsCount
public void setPointsCount(int count) -
getPointsCount
-
getPointConverterTypeEntity
-
getScaleMin
- Specified by:
getScaleMinin classAbstractInstance
-
getScaleMax
- Specified by:
getScaleMaxin classAbstractInstance
-