public class StrategyBuilder extends Object
OrderBuilder
,
Order
Constructor and Description |
---|
StrategyBuilder()
Creates a new StrategyBuilder.
|
StrategyBuilder(Strategy previousStrategy)
Creates a new StrategyBuilder with previous fieldSets.
|
Modifier and Type | Method and Description |
---|---|
OrderBuilder |
addOrderBuilder(int legID)
Adds an
OrderBuilder to this instance of StrategyBuilder with
the specified leg ID. |
OrderBuilder |
addOrderBuilder(int legID,
Order previousOrder)
Adds an
OrderBuilder to this instance of StrategyBuilder with
the specified leg ID and previous field set. |
Strategy |
build()
Materialises a Strategy object as configured by the StrategyBuilder.
|
Strategy |
build(boolean isSales)
Materialises a Strategy object as configured by the StrategyBuilder, including sales fields if isSales
is true.
|
StrategyFieldSet |
getEditableFields()
Returns the fields relating to the strategy that can be edited by the user.
|
StrategyFieldSet |
getFixedFields()
Returns the fields relating to the strategy that cannot be edited by the user
|
OrderBuilder |
getOrderBuilder(int legID)
Gets an
OrderBuilder with the specified leg ID. |
OrderBuilder |
getOrderBuilder(String orderID)
Gets an
OrderBuilder with the specified order ID. |
String |
toString() |
public StrategyBuilder()
public StrategyBuilder(Strategy previousStrategy)
previousStrategy
- Previous strategy.public OrderBuilder addOrderBuilder(int legID, Order previousOrder)
Adds an OrderBuilder
to this instance of StrategyBuilder with
the specified leg ID and previous field set.
This instance of StrategyBuilderHelper retains a reference to the
OrderBuilder so that it can be used to build the corresponding
Order
when you call build()
.
legID
- The leg ID of the OrderBuilder.previousOrder
- The previous order.public OrderBuilder addOrderBuilder(int legID)
Adds an OrderBuilder
to this instance of StrategyBuilder with
the specified leg ID.
This instance of StrategyBuilderHelper retains a reference to the
OrderBuilder so that it can be used to build the corresponding
Order
when you call build()
.
legID
- The leg ID of the OrderBuilder.public OrderBuilder getOrderBuilder(int legID)
OrderBuilder
with the specified leg ID. The OrderBuilder
must have been previously registered by calling addOrderBuilder(int)
for this method to be able to return it.legID
- The leg ID of the OrderBuilder to retrieve.public OrderBuilder getOrderBuilder(String orderID)
OrderBuilder
with the specified order ID. The OrderBuilder
must have been previously registered by calling addOrderBuilder(int)
and the order ID must have been set by calling OrderBuilder.setOrderId(String)
in order for this method to be able to return it.orderID
- The order ID of the OrderBuilder to retrieve.public Strategy build()
Strategy
public Strategy build(boolean isSales)
Strategy
public StrategyFieldSet getFixedFields()
public StrategyFieldSet getEditableFields()
Copyright © 2015 Caplin Systems.