public SwapSecurity createSecurity(final OperationContext context, final SwapSecurityBean bean) {
return bean.getSwapType().accept(new FinancialSecurityVisitorAdapter<SwapSecurity>() {
@Override
public SwapSecurity visitForwardSwapSecurity(ForwardSwapSecurity ignore) {
return new ForwardSwapSecurity(zonedDateTimeBeanToDateTimeWithZone(bean.getTradeDate()), zonedDateTimeBeanToDateTimeWithZone(bean.getEffectiveDate()),
zonedDateTimeBeanToDateTimeWithZone(bean.getMaturityDate()), bean.getCounterparty(), SwapLegBeanOperation.createSwapLeg(bean.getPayLeg()),
SwapLegBeanOperation.createSwapLeg(bean.getReceiveLeg()), zonedDateTimeBeanToDateTimeWithZone(bean.getForwardStartDate()));
}
@Override