return security;
}
@Override
public CommodityForwardSecurity visitMetalForwardType(MetalForwardSecurityBean bean) {
final MetalForwardSecurity security = new MetalForwardSecurity(
bean.getUnitName().getName(),
bean.getUnitNumber(),
expiryBeanToExpiry(bean.getExpiry()),
currencyBeanToCurrency(bean.getCurrency()),
bean.getUnitAmount(),
bean.getCategory().getName());
security.setUnitNumber(bean.getUnitNumber());
if (bean.getUnitName() != null) {
security.setUnitName(bean.getUnitName().getName());
}
security.setUnderlyingId(externalIdBeanToExternalId(bean
.getUnderlying()));
return security;
}
});