return security;
}
@Override
public FutureSecurity visitMetalFutureType(MetalFutureBean bean) {
final MetalFutureSecurity security = new MetalFutureSecurity(
expiryBeanToExpiry(bean.getExpiry()),
bean.getTradingExchange().getName(),
bean.getSettlementExchange().getName(),
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;
}
@Override
public FutureSecurity visitIndexFutureType(IndexFutureBean bean) {
final IndexFutureSecurity security = new IndexFutureSecurity(
expiryBeanToExpiry(bean.getExpiry()),
bean.getTradingExchange().getName(),
bean.getSettlementExchange().getName(),
currencyBeanToCurrency(bean.getCurrency()),
bean.getUnitAmount(),
bean.getCategory().getName());
security.setUnderlyingId(externalIdBeanToExternalId(bean
.getUnderlying()));
return security;
}
@Override
public FutureSecurity visitStockFutureType(StockFutureBean bean) {
final StockFutureSecurity security = new StockFutureSecurity(
expiryBeanToExpiry(bean.getExpiry()),
bean.getTradingExchange().getName(),
bean.getSettlementExchange().getName(),
currencyBeanToCurrency(bean.getCurrency()),
bean.getUnitAmount(),
bean.getCategory().getName());
security.setUnderlyingId(externalIdBeanToExternalId(bean
.getUnderlying()));
return security;
}
@Override