Class Formula


public class Formula extends TypePart
Represents a formula in a ProductCmptType.
Since:
24.7
  • Constructor Details

    • Formula

      public Formula(Type type, Method getter, boolean changingOverTime)
  • Method Details

    • isChangingOverTime

      public boolean isChangingOverTime()
    • getFormulaText

      public String getFormulaText(IProductComponent productComponent, @CheckForNull Calendar effectiveDate)
      Returns the formula text of this formula in the given product component.
      Parameters:
      productComponent - a product component based on the product component type this formula belongs to.
      effectiveDate - (optional) the date to use for selecting the product component's generation, if this formula isChangingOverTime()
    • setFormulaText

      public void setFormulaText(IProductComponent productComponent, @CheckForNull Calendar effectiveDate, String formulaText)
      Sets the formula text of this formula in the given product component.
      Parameters:
      productComponent - a product component based on the product component type this formula belongs to.
      effectiveDate - (optional) the date to use for selecting the product component's generation, if this formula isChangingOverTime()
      formulaText - the new formula text
    • getFormulaName

      public String getFormulaName()
      Returns the name of the formula.
    • toString

      public String toString()
      Overrides:
      toString in class ModelElement