java.lang.Object
ch.tocco.nice2.optional.qualification.impl.util.entities.AbstractNode
All Implemented Interfaces:
Comparable<AbstractNode>
Direct Known Subclasses:
EvaluationNode, InputNode

public abstract class AbstractNode extends Object implements Comparable<AbstractNode>
  • Field Details

  • Constructor Details

  • Method Details

    • getSorting

      @Nullable public abstract @Nullable Integer getSorting()
    • getParent

      @Nullable public abstract @Nullable EvaluationNode getParent()
    • getAllParents

      public abstract Collection<EvaluationNode> getAllParents()
      Returns:
      all existing parents (Input_nodes can have multiple parents)
    • isMandatory

      public abstract boolean isMandatory()
    • getPromotionRules

      public Collection<PromotionRule> getPromotionRules()
    • getPromotionRuleEntities

      public Set<Entity> getPromotionRuleEntities()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • compareTo

      public int compareTo(AbstractNode o)
      Specified by:
      compareTo in interface Comparable<AbstractNode>
    • getKey

      public PrimaryKey getKey()
    • getDelegate

      public Entity getDelegate()
    • getChildren

      public Collection<AbstractNode> getChildren(boolean recursively, boolean includeLookupOnly)
      Get all child nodes in the qualification structure
      Parameters:
      recursively - should all children in the entire tree be loaded?
      includeLookupOnly - should only lookups be included?
      Returns:
      Returns always just the direct children of the current node
    • getNode

      public static AbstractNode getNode(Entity node, QualificationService qualificationService, Context context)
    • getRootEvaluationNode

      public abstract EvaluationNode getRootEvaluationNode()
    • getRounding

      public BigDecimal getRounding()
    • getRoundingPoints

      public BigDecimal getRoundingPoints()
    • getRoundingPercentage

      @Nullable public @Nullable BigDecimal getRoundingPercentage()
    • getWeight

      public abstract BigDecimal getWeight()
    • getInstances

      public abstract Collection<AbstractInstance> getInstances()
    • createInstanceEntity

      public abstract Entity createInstanceEntity(@Nullable @Nullable Entity parentEvaluation, @Nullable @Nullable org.joda.time.LocalDate date)
    • isInternalOnly

      public abstract boolean isInternalOnly()
    • isVisibleInReport

      public abstract boolean isVisibleInReport()
    • isActive

      public boolean isActive()
      Returns:
      true if this node has not been archived
    • getShort

      public String getShort()
    • getLabel

      public String getLabel()
    • getPk

      public String getPk()
    • getUniquePk

      public abstract String getUniquePk()
    • getMaxPoints

      @Nullable public @Nullable BigDecimal getMaxPoints()
    • isSummarizePoints

      public abstract Boolean isSummarizePoints()