public interface ResolvableSecurityTrade extends SecurityQuantityTrade, ResolvableCalculationTarget
This represents those trades that hold a security identifier. It allows the trade to be resolved, returning an alternate representation of the same trade with complete security information.
| Modifier and Type | Method and Description |
|---|---|
default SecuritizedProductTrade<?> |
resolveTarget(ReferenceData refData)
Resolves the security identifier using the specified reference data.
|
ResolvableSecurityTrade |
withInfo(PortfolioItemInfo info)
Returns an instance with the specified info.
|
ResolvableSecurityTrade |
withPrice(double price)
Returns an instance with the specified price.
|
ResolvableSecurityTrade |
withQuantity(double quantity)
Returns an instance with the specified quantity.
|
getPricegetIdgetQuantity, getSecurityIddefault SecuritizedProductTrade<?> resolveTarget(ReferenceData refData)
This takes the security identifier of this trade, looks it up in reference data, and returns the equivalent trade with full security information. If the security has underlying securities, they will also have been resolved in the result.
The resulting trade is bound to data from reference data. If the data changes, the resulting trade form will not be updated. Care must be taken when placing the resolved form in a cache or persistence layer.
resolveTarget in interface ResolvableCalculationTargetrefData - the reference data to use when resolvingReferenceDataNotFoundException - if an identifier cannot be resolved in the reference dataRuntimeException - if unable to resolve due to an invalid definitionResolvableSecurityTrade withInfo(PortfolioItemInfo info)
withInfo in interface PortfolioItemwithInfo in interface SecurityQuantityTradewithInfo in interface Tradeinfo - the new infoResolvableSecurityTrade withQuantity(double quantity)
withQuantity in interface SecurityQuantityTradequantity - the new quantityResolvableSecurityTrade withPrice(double price)
withPrice in interface SecurityQuantityTradeprice - the new priceCopyright 2009-Present by OpenGamma Inc. and individual contributors
Apache v2 licensed
Additional documentation can be found at strata.opengamma.io.