Record Class VariableData

java.lang.Object
java.lang.Record
app.valuationcontrol.multimodule.library.records.VariableData

public record VariableData(Long id, @NotEmpty @Pattern(regexp="^(?:[A-z]|[0-9]|[ ]|[%])*") String variableName, String variableDescription, Long variableAreaId, Long variableSubAreaId, String variableFormula, @NotEmpty @Pattern(regexp="input|calc|constant|check|single_result|kpi|sub_total_row|total_row",flags=CASE_INSENSITIVE) String variableType, Integer row, Integer variableOrder, Integer variableDepth, boolean variableApplyToHistoricals, @NotEmpty @Pattern(regexp="decimal|integer|percent|date",flags=CASE_INSENSITIVE) String variableFormat, List<VariableValueData> variableValues, List<Long> variableDependencies, String evaluatedVariableFormula, Long originalId, String evaluatedXLformula, List<Object[]> historicalValues, List<Object[]> projectionValues, boolean modelledAtSegment, List<Object> singleOrConstantValue, List<Object> yearToDateValue, List<Object> yearToGoValue) extends Record
  • Constructor Details

    • VariableData

      public VariableData(Long id, @NotEmpty @Pattern(regexp="^(?:[A-z]|[0-9]|[ ]|[%])*") @NotEmpty @Pattern(regexp="^(?:[A-z]|[0-9]|[ ]|[%])*") String variableName, String variableDescription, Long variableAreaId, Long variableSubAreaId, String variableFormula, @NotEmpty @Pattern(regexp="input|calc|constant|check|single_result|kpi|sub_total_row|total_row",flags=CASE_INSENSITIVE) @NotEmpty @Pattern(regexp="input|calc|constant|check|single_result|kpi|sub_total_row|total_row",flags=CASE_INSENSITIVE) String variableType, Integer row, Integer variableOrder, Integer variableDepth, boolean variableApplyToHistoricals, @NotEmpty @Pattern(regexp="decimal|integer|percent|date",flags=CASE_INSENSITIVE) @NotEmpty @Pattern(regexp="decimal|integer|percent|date",flags=CASE_INSENSITIVE) String variableFormat, List<VariableValueData> variableValues, List<Long> variableDependencies, String evaluatedVariableFormula, Long originalId, String evaluatedXLformula, List<Object[]> historicalValues, List<Object[]> projectionValues, boolean modelledAtSegment, List<Object> singleOrConstantValue, List<Object> yearToDateValue, List<Object> yearToGoValue)
      Creates an instance of a VariableData record class.
      Parameters:
      id - the value for the id record component
      variableName - the value for the variableName record component
      variableDescription - the value for the variableDescription record component
      variableAreaId - the value for the variableAreaId record component
      variableSubAreaId - the value for the variableSubAreaId record component
      variableFormula - the value for the variableFormula record component
      variableType - the value for the variableType record component
      row - the value for the row record component
      variableOrder - the value for the variableOrder record component
      variableDepth - the value for the variableDepth record component
      variableApplyToHistoricals - the value for the variableApplyToHistoricals record component
      variableFormat - the value for the variableFormat record component
      variableValues - the value for the variableValues record component
      variableDependencies - the value for the variableDependencies record component
      evaluatedVariableFormula - the value for the evaluatedVariableFormula record component
      originalId - the value for the originalId record component
      evaluatedXLformula - the value for the evaluatedXLformula record component
      historicalValues - the value for the historicalValues record component
      projectionValues - the value for the projectionValues record component
      modelledAtSegment - the value for the modelledAtSegment record component
      singleOrConstantValue - the value for the singleOrConstantValue record component
      yearToDateValue - the value for the yearToDateValue record component
      yearToGoValue - the value for the yearToGoValue record component
  • Method Details

    • isSingleEntry

      public boolean isSingleEntry()
    • getValueInPeriod

      public Double getValueInPeriod(Integer period, Integer segmentIndex)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public Long id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • variableName

      @NotEmpty @Pattern(regexp="^(?:[A-z]|[0-9]|[ ]|[%])*") public @NotEmpty @Pattern(regexp="^(?:[A-z]|[0-9]|[ ]|[%])*") String variableName()
      Returns the value of the variableName record component.
      Returns:
      the value of the variableName record component
    • variableDescription

      public String variableDescription()
      Returns the value of the variableDescription record component.
      Returns:
      the value of the variableDescription record component
    • variableAreaId

      public Long variableAreaId()
      Returns the value of the variableAreaId record component.
      Returns:
      the value of the variableAreaId record component
    • variableSubAreaId

      public Long variableSubAreaId()
      Returns the value of the variableSubAreaId record component.
      Returns:
      the value of the variableSubAreaId record component
    • variableFormula

      public String variableFormula()
      Returns the value of the variableFormula record component.
      Returns:
      the value of the variableFormula record component
    • variableType

      @NotEmpty @Pattern(regexp="input|calc|constant|check|single_result|kpi|sub_total_row|total_row", flags=CASE_INSENSITIVE) public @NotEmpty @Pattern(regexp="input|calc|constant|check|single_result|kpi|sub_total_row|total_row",flags=CASE_INSENSITIVE) String variableType()
      Returns the value of the variableType record component.
      Returns:
      the value of the variableType record component
    • row

      public Integer row()
      Returns the value of the row record component.
      Returns:
      the value of the row record component
    • variableOrder

      public Integer variableOrder()
      Returns the value of the variableOrder record component.
      Returns:
      the value of the variableOrder record component
    • variableDepth

      public Integer variableDepth()
      Returns the value of the variableDepth record component.
      Returns:
      the value of the variableDepth record component
    • variableApplyToHistoricals

      public boolean variableApplyToHistoricals()
      Returns the value of the variableApplyToHistoricals record component.
      Returns:
      the value of the variableApplyToHistoricals record component
    • variableFormat

      @NotEmpty @Pattern(regexp="decimal|integer|percent|date", flags=CASE_INSENSITIVE) public @NotEmpty @Pattern(regexp="decimal|integer|percent|date",flags=CASE_INSENSITIVE) String variableFormat()
      Returns the value of the variableFormat record component.
      Returns:
      the value of the variableFormat record component
    • variableValues

      public List<VariableValueData> variableValues()
      Returns the value of the variableValues record component.
      Returns:
      the value of the variableValues record component
    • variableDependencies

      public List<Long> variableDependencies()
      Returns the value of the variableDependencies record component.
      Returns:
      the value of the variableDependencies record component
    • evaluatedVariableFormula

      public String evaluatedVariableFormula()
      Returns the value of the evaluatedVariableFormula record component.
      Returns:
      the value of the evaluatedVariableFormula record component
    • originalId

      public Long originalId()
      Returns the value of the originalId record component.
      Returns:
      the value of the originalId record component
    • evaluatedXLformula

      public String evaluatedXLformula()
      Returns the value of the evaluatedXLformula record component.
      Returns:
      the value of the evaluatedXLformula record component
    • historicalValues

      public List<Object[]> historicalValues()
      Returns the value of the historicalValues record component.
      Returns:
      the value of the historicalValues record component
    • projectionValues

      public List<Object[]> projectionValues()
      Returns the value of the projectionValues record component.
      Returns:
      the value of the projectionValues record component
    • modelledAtSegment

      public boolean modelledAtSegment()
      Returns the value of the modelledAtSegment record component.
      Returns:
      the value of the modelledAtSegment record component
    • singleOrConstantValue

      public List<Object> singleOrConstantValue()
      Returns the value of the singleOrConstantValue record component.
      Returns:
      the value of the singleOrConstantValue record component
    • yearToDateValue

      public List<Object> yearToDateValue()
      Returns the value of the yearToDateValue record component.
      Returns:
      the value of the yearToDateValue record component
    • yearToGoValue

      public List<Object> yearToGoValue()
      Returns the value of the yearToGoValue record component.
      Returns:
      the value of the yearToGoValue record component