java.lang.Object
ch.tocco.nice2.optional.qualification.impl.util.entities.AbstractInstance
All Implemented Interfaces:
Instance
Direct Known Subclasses:
Evaluation, Input

public abstract class AbstractInstance extends Object implements Instance
  • Field Details

    • delegate

      protected final Entity delegate
    • qualificationService

      protected final QualificationService qualificationService
    • context

      protected final Context context
  • Constructor Details

  • Method Details

    • getNode

      public abstract AbstractNode getNode()
    • getGrades

      public abstract List<BigDecimal> getGrades(Entity participant) throws InterruptedException
      Throws:
      InterruptedException
    • isMandatory

      public abstract boolean isMandatory()
    • getOrCreateData

      @Nullable public abstract @Nullable AbstractData getOrCreateData(Entity participant)
    • getData

      @Nullable public abstract @Nullable AbstractData getData(Entity participant)
    • 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

      public String getColumnHeader()
    • getTooltip

      public String getTooltip()
    • getRounding

      public BigDecimal getRounding()
    • getGradeMin

      public BigDecimal getGradeMin()
    • getGradeMax

      public BigDecimal getGradeMax()
    • getGradeAvg

      public BigDecimal getGradeAvg()
    • getShort

      public String getShort()
      Specified by:
      getShort in interface Instance
      Returns:
      the 'short' field of the underlying entity. it should uniquely describe this instance^s node
    • getLabel

      public String getLabel()
    • getDate

      @Nullable public @Nullable org.joda.time.LocalDate getDate()
      Specified by:
      getDate in interface Instance
    • getEvents

      public EntityList getEvents()
    • getRootEvents

      public EntityList getRootEvents()
    • getParticipants

      public EntityList getParticipants()
      Get all the participants (User entities) for this instance.
      Returns:
      EntityList containing all registered users
      Throws:
      PersistException - /
    • getParticipantRegistrations

      public EntityList getParticipantRegistrations()
    • getParticipantRegistrations

      public EntityList getParticipantRegistrations(Condition condition)
      Get all the registrations for this instance.
      Returns:
      EntityList containing all registrations
    • getParticipants

      public EntityList getParticipants(EntityList registrations)
      Same behaviour as getParticipants(). To improve performance the registrations can be passed as a parameter if already acquired by calling getParticipantRegistrations().
      Returns:
      EntityList containing all registered users
    • getParentEvaluation

      @Nullable public abstract @Nullable Evaluation getParentEvaluation()
    • getNode

      public abstract AbstractNode getNode(EvaluationNode parent)
    • getChildrenMap

      public com.google.common.collect.Multimap<String,Instance> getChildrenMap()
      Description copied from interface: Instance
      Keys are the 'short' field (see Instance.getShort()) of an Instance, values are all child instances of this instance
      Specified by:
      getChildrenMap in interface Instance
      Returns:
      a map of all children of this node, including thid node itself
    • getAllChildren

      public Collection<AbstractInstance> getAllChildren()
    • getDelegate

      public Entity getDelegate()
    • getQualificationService

      public QualificationService getQualificationService()
    • isPublished

      public boolean isPublished()