new module:ct-trading /trademodel /Abstract Trade Factory()
An abstract TradeFactory implementation that handles trade restoration.
Extending classes should only implement
module:ct-trading/trademodel/TradeFactory#createNewTrade
. They should also
invoke the super constructor.
- Implements:
Methods
restore Existing Trade(oTrade, mField Map)
Restores a trade that is currently known on the client.
Parameters:
Name | Type | Description |
---|---|---|
oTrade |
module:ct-trading |
the trade object to restore. |
mFieldMap |
Map | the trade data to restore the trade with. |
restore New Trade(mField Map) → {module:ct-trading /trademodel /Trade}
Restores a trade that is not known on the client, then returns the newly created trade.
This method internally invokes module:ct-trading/trademodel/AbstractTradeFactory#restoreExistingTrade
on the newly restored trade.
Parameters:
Name | Type | Description |
---|---|---|
mFieldMap |
Map | The data to restore the trade with. |
Returns:
The newly created trade.