Class Variable
java.lang.Object
app.valuationcontrol.multimodule.library.entities.Variable
- All Implemented Interfaces:
DataTransformer<VariableData>,ModelProvider
@Entity
public class Variable
extends Object
implements DataTransformer<VariableData>, ModelProvider
This class is an entity that a variable within a model
- Author:
- thomas
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasData()intcolumnOfSegmentAndPeriod(int segmentIndex, Integer period) Calculates column index based on segmentintcolumnOfSegmentAndPeriod(Segment segment, Integer period) Calculates column index based on segmentbooleangenerateAllPeriodsRange(DataPeriod dataPeriod) generateFirstPeriodRange(DataPeriod dataPeriod) generateHistoricalRange(DataPeriod dataPeriod) generateLastPeriodRange(DataPeriod dataPeriod) generateProjectionRange(DataPeriod dataPeriod) intReturn the primary columnintgetRow()getVariableValuesForAScenario(SCENARIO scenario) Returns all @VariableValue attached to the specified scenariointhashCode()booleanbooleanbooleanbooleanIndicates whether the variable is a constant or a single resultbooleanvoidupdateFromVariableData(VariableData variableData, Area area, SubArea subArea)
-
Field Details
-
CONSTANT
- See Also:
-
CONSTANT_OR_SINGLE
-
-
Constructor Details
-
Variable
public Variable() -
Variable
-
Variable
-
Variable
-
-
Method Details
-
updateFromVariableData
-
generateHistoricalRange
-
generateProjectionRange
-
generateAllPeriodsRange
-
generateLastPeriodRange
-
generateFirstPeriodRange
-
getVariableValuesForAScenario
Returns all @VariableValue attached to the specified scenario- Parameters:
scenario- the scenario to be assessed- Returns:
- A list of @VariableValue
-
isSingleOrConstantValue
public boolean isSingleOrConstantValue()Indicates whether the variable is a constant or a single result- Returns:
- a boolean
-
getPrimaryColumn
public int getPrimaryColumn()Return the primary column- Returns:
- the primary column as int
-
getRow
public int getRow() -
getVariableAreaId
-
getVariableSubAreaId
-
isModelledAtSegment
public boolean isModelledAtSegment() -
asData
- Specified by:
asDatain interfaceDataTransformer<VariableData>
-
isConstant
public boolean isConstant() -
getModelId
- Specified by:
getModelIdin interfaceModelProvider
-
equals
-
hashCode
public int hashCode() -
columnOfSegmentAndPeriod
Calculates column index based on segment- Parameters:
segmentIndex- zero based segment index, -1 means aggregationperiod- the period index relative to the startYear. If this variable is a single_result or constant the period sent in is disregarded- Returns:
- the column for the period and segment
-
columnOfSegmentAndPeriod
Calculates column index based on segment- Parameters:
segment- The segment to be checkedperiod- the period index relative to the startYear- Returns:
- the column for the period and segment
-
isPercentOrKPI
public boolean isPercentOrKPI() -
isTypeTotal
public boolean isTypeTotal()
-