• java.lang.Object
• All Implemented Interfaces:
Bean, ImmutableBean

public final class CalculationTasks
extends java.lang.Object
implements ImmutableBean
The tasks that will be used to perform the calculations.

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.

• ### Method Summary

All Methods
Modifier and Type Method Description
boolean equals​(java.lang.Object obj)
java.util.List<Column> getColumns()
Gets the columns that will be calculated.
java.util.List<CalculationTarget> getTargets()
Gets the targets that calculations will be performed on.
java.util.List<CalculationTask> getTasks()
Gets the tasks that perform the individual calculations.
int hashCode()
static TypedMetaBean<CalculationTasks> meta()
The meta-bean for CalculationTasks.
TypedMetaBean<CalculationTasks> metaBean()
static CalculationTasks of​(CalculationRules rules, java.util.List<? extends CalculationTarget> targets, java.util.List<Column> columns)
Obtains an instance from a set of targets, columns and rules.
static CalculationTasks of​(CalculationRules rules, java.util.List<? extends CalculationTarget> targets, java.util.List<Column> columns, ReferenceData refData)
Obtains an instance from a set of targets, columns and rules, resolving the targets.
static CalculationTasks of​(java.util.List<CalculationTask> tasks, java.util.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.
java.lang.String toString()
• ### Methods inherited from class java.lang.Object

clone, finalize, getClass, notify, notifyAll, wait, wait, wait
• ### Methods inherited from interface org.joda.beans.Bean

property, propertyNames
• ### Method Detail

• #### of

public static CalculationTasks of​(CalculationRules rules,
java.util.List<? extends CalculationTarget> targets,
java.util.List<Column> columns)
Obtains an instance from a set of targets, columns and rules.

The targets will typically be trades. The columns represent the measures to calculate.

Any target that implements ResolvableCalculationTarget will result in a failed task.

Parameters:
rules - the rules defining how the calculation is performed
targets - the targets for which values of the measures will be calculated
columns - the columns that will be calculated
Returns:
• #### of

public static CalculationTasks of​(CalculationRules rules,
java.util.List<? extends CalculationTarget> targets,
java.util.List<Column> columns,
ReferenceData refData)
Obtains an instance from a set of targets, columns and rules, resolving the targets.

The targets will typically be trades and positions. The columns represent the measures to calculate.

The targets will be resolved if they implement ResolvableCalculationTarget.

Parameters:
rules - the rules defining how the calculation is performed
targets - the targets for which values of the measures will be calculated
columns - the columns that will be calculated
refData - the reference data to use to resolve the targets
Returns:
• #### of

public static CalculationTasks of​(java.util.List<CalculationTask> tasks,
java.util.List<Column> columns)
Obtains an instance from a set of tasks and columns.
Parameters:
tasks - the tasks that perform the calculations
columns - the columns that define the calculations
Returns:
• #### requirements

public MarketDataRequirements requirements​(ReferenceData refData)
Gets the market data that is required to perform the calculations.

This can be used to pass into the market data system to obtain and calibrate data.

Parameters:
refData - the reference data
Returns:
the market data required for all calculations
Throws:
java.lang.RuntimeException - if unable to obtain the requirements
• #### toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
• #### meta

public static TypedMetaBean<CalculationTasks> meta()
The meta-bean for CalculationTasks.
Returns:
the meta-bean, not null
• #### metaBean

public TypedMetaBean<CalculationTasks> metaBean()
Specified by:
metaBean in interface Bean
• #### getTargets

public java.util.List<CalculationTarget> getTargets()
Gets the targets that calculations will be performed on.

The result of the calculations will be a grid where each row is taken from this list.

Returns:
the value of the property, not empty
• #### getColumns

public java.util.List<Column> getColumns()
Gets the columns that will be calculated.

The result of the calculations will be a grid where each column is taken from this list.

Returns:
the value of the property, not empty

public java.util.List<CalculationTask> getTasks()
Gets the tasks that perform the individual calculations.

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.

Returns:
the value of the property, not empty
• #### equals

public boolean equals​(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
• #### hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object