public final class CalculationTasks extends Object implements org.joda.beans.ImmutableBean
This captures the targets, columns and tasks that define the result grid.
Each task can be executed to produce the result. Applications will typically
use CalculationRunner or CalculationTaskRunner to execute the tasks.
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
List<Column> |
getColumns()
Gets the columns that will be calculated.
|
List<CalculationTarget> |
getTargets()
Gets the targets that calculations will be performed on.
|
List<CalculationTask> |
getTasks()
Gets the tasks that perform the individual calculations.
|
int |
hashCode() |
static org.joda.beans.TypedMetaBean<CalculationTasks> |
meta()
The meta-bean for
CalculationTasks. |
org.joda.beans.TypedMetaBean<CalculationTasks> |
metaBean() |
static CalculationTasks |
of(CalculationRules rules,
List<? extends CalculationTarget> targets,
List<Column> columns)
Obtains an instance from a set of targets, columns and rules.
|
static CalculationTasks |
of(CalculationRules rules,
List<? extends CalculationTarget> targets,
List<Column> columns,
ReferenceData refData)
Obtains an instance from a set of targets, columns and rules, resolving the targets.
|
static CalculationTasks |
of(List<CalculationTask> tasks,
List<Column> columns)
Obtains an instance from a set of tasks and columns.
|
MarketDataRequirements |
requirements(ReferenceData refData)
Gets the market data that is required to perform the calculations.
|
String |
toString() |
public static CalculationTasks of(CalculationRules rules, List<? extends CalculationTarget> targets, List<Column> columns)
The targets will typically be trades. The columns represent the measures to calculate.
Any target that implements ResolvableCalculationTarget will result in a failed task.
rules - the rules defining how the calculation is performedtargets - the targets for which values of the measures will be calculatedcolumns - the columns that will be calculatedpublic static CalculationTasks of(CalculationRules rules, List<? extends CalculationTarget> targets, List<Column> columns, ReferenceData refData)
The targets will typically be trades and positions. The columns represent the measures to calculate.
The targets will be resolved if they implement ResolvableCalculationTarget.
rules - the rules defining how the calculation is performedtargets - the targets for which values of the measures will be calculatedcolumns - the columns that will be calculatedrefData - the reference data to use to resolve the targetspublic static CalculationTasks of(List<CalculationTask> tasks, List<Column> columns)
tasks - the tasks that perform the calculationscolumns - the columns that define the calculationspublic MarketDataRequirements requirements(ReferenceData refData)
This can be used to pass into the market data system to obtain and calibrate data.
refData - the reference dataRuntimeException - if unable to obtain the requirementspublic static org.joda.beans.TypedMetaBean<CalculationTasks> meta()
CalculationTasks.public org.joda.beans.TypedMetaBean<CalculationTasks> metaBean()
metaBean in interface org.joda.beans.Beanpublic List<CalculationTarget> getTargets()
The result of the calculations will be a grid where each row is taken from this list.
public List<Column> getColumns()
The result of the calculations will be a grid where each column is taken from this list.
public List<CalculationTask> getTasks()
The results can be visualized as a grid, with a row for each target and a column for each measure. Each task can calculate the result for one or more cells in the grid.
Copyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.