Class AbstractInstance
java.lang.Object
ch.tocco.nice2.optional.qualification.impl.util.entities.AbstractInstance
- All Implemented Interfaces:
Instance
- Direct Known Subclasses:
Evaluation
,Input
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Context
protected final Entity
protected final QualificationService
-
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractInstance
(Entity delegate, QualificationService qualificationService, Context context) -
Method Summary
Modifier and TypeMethodDescriptionKeys are the 'short' field (seeInstance.getShort()
) of an Instance, values are all child instances of this instanceabstract @Nullable AbstractData
@Nullable org.joda.time.LocalDate
getDate()
abstract List
<BigDecimal> getLabel()
abstract AbstractNode
getNode()
abstract AbstractNode
getNode
(EvaluationNode parent) abstract @Nullable AbstractData
getOrCreateData
(Entity participant) abstract @Nullable Evaluation
getParticipantRegistrations
(Condition condition) Get all the registrations for this instance.Get all the participants (User entities) for this instance.getParticipants
(EntityList registrations) Same behaviour asgetParticipants()
.abstract @Nullable org.joda.time.DateTime
abstract @Nullable org.joda.time.DateTime
getShort()
abstract boolean
boolean
abstract boolean
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.tocco.nice2.optional.qualification.api.util.entities.Instance
getRatingData, getUniqueKey
-
Field Details
-
delegate
-
qualificationService
-
context
-
-
Constructor Details
-
AbstractInstance
protected AbstractInstance(Entity delegate, QualificationService qualificationService, Context context)
-
-
Method Details
-
getNode
-
getGrades
- Throws:
InterruptedException
-
isMandatory
public abstract boolean isMandatory() -
getOrCreateData
-
getData
-
getPublishedFrom
@Nullable public abstract @Nullable org.joda.time.DateTime getPublishedFrom() -
getPublishedTo
@Nullable public abstract @Nullable org.joda.time.DateTime getPublishedTo() -
isVisible
public abstract boolean isVisible() -
getColumnHeader
-
getTooltip
-
getRounding
-
getGradeMin
-
getGradeMax
-
getGradeAvg
-
getShort
-
getLabel
-
getDate
@Nullable public @Nullable org.joda.time.LocalDate getDate() -
getEvents
-
getRootEvents
-
getParticipants
Get all the participants (User entities) for this instance.- Returns:
- EntityList containing all registered users
- Throws:
PersistException
- /
-
getParticipantRegistrations
-
getParticipantRegistrations
Get all the registrations for this instance.- Returns:
- EntityList containing all registrations
-
getParticipants
Same behaviour asgetParticipants()
. To improve performance the registrations can be passed as a parameter if already acquired by callinggetParticipantRegistrations()
.- Returns:
- EntityList containing all registered users
-
getParentEvaluation
-
getNode
-
getChildrenMap
Description copied from interface:Instance
Keys are the 'short' field (seeInstance.getShort()
) of an Instance, values are all child instances of this instance- Specified by:
getChildrenMap
in interfaceInstance
- Returns:
- a map of all children of this node, including thid node itself
-
getAllChildren
-
getDelegate
-
getQualificationService
-
isPublished
public boolean isPublished()
-