return new ObjectsPair<ManageablePosition, ManageableSecurity[]>(null, null);
}
// Write the related security(ies)
ManageableSecurityLink sLink = position.getSecurityLink();
Security security = sLink.resolveQuiet(_securitySource);
if ((security != null) && (security instanceof ManageableSecurity)) {
// Find underlying security
// TODO support multiple underlyings; unfortunately the system does not provide a standard way
// to retrieve underlyings
if (((ManageableSecurity) security).propertyNames().contains("underlyingId")) {
ExternalId id = (ExternalId) ((ManageableSecurity) security).property("underlyingId").get();
Security underlying;
try {
underlying = _securitySource.getSingle(id.toBundle());
if (underlying != null) {
return new ObjectsPair<ManageablePosition, ManageableSecurity[]>(
position,