}
@Override
public Void visitInterestRateFutureSecurity(InterestRateFutureSecurity security) {
assertTrue(fromSecMaster instanceof InterestRateFutureSecurity);
InterestRateFutureSecurity actual = (InterestRateFutureSecurity) fromSecMaster;
assertEquals(security.getCurrency(), actual.getCurrency());
assertEquals(security.getExpiry(), actual.getExpiry());
assertEquals(security.getExternalIdBundle(), actual.getExternalIdBundle());
assertEquals(security.getName(), actual.getName());
assertEquals(security.getSecurityType(), actual.getSecurityType());
assertEquals(security.getSettlementExchange(), actual.getSettlementExchange());
assertEquals(security.getTradingExchange(), actual.getTradingExchange());
assertEquals(security.getUnderlyingId(), actual.getUnderlyingId());
assertEquals(security.getUnitAmount(), actual.getUnitAmount());
assertNotNull(actual.getUniqueId());
return null;
}
@Override
public Void visitMetalFutureSecurity(MetalFutureSecurity security) {
assertSecurity();
return null;
}
@Override
public Void visitStockFutureSecurity(StockFutureSecurity security) {
assertSecurity();
return null;
}
});
return null;
}
@Override
public Void visitSwapSecurity(SwapSecurity security) {
assertSecurity();
return null;
}
@Override
public Void visitEquityIndexOptionSecurity(EquityIndexOptionSecurity security) {
assertTrue(fromSecMaster instanceof EquityIndexOptionSecurity);
EquityIndexOptionSecurity actual = (EquityIndexOptionSecurity) fromSecMaster;
assertEquals(security.getCurrency(), actual.getCurrency());
assertEquals(security.getExchange(), actual.getExchange());
assertEquals(security.getExerciseType(), actual.getExerciseType());
assertEquals(security.getExpiry(), actual.getExpiry());
assertEquals(security.getExternalIdBundle(), actual.getExternalIdBundle());
assertEquals(security.getName(), actual.getName());
assertEquals(security.getOptionType(), actual.getOptionType());
assertEquals(security.getPointValue(), actual.getPointValue());
assertEquals(security.getSecurityType(), actual.getSecurityType());
assertEquals(security.getStrike(), actual.getStrike());
assertEquals(security.getUnderlyingId(), actual.getUnderlyingId());
assertNotNull(actual.getUniqueId());
return null;
}
@Override
public Void visitEquityOptionSecurity(EquityOptionSecurity security) {
assertTrue(fromSecMaster instanceof EquityOptionSecurity);
EquityOptionSecurity actual = (EquityOptionSecurity) fromSecMaster;
assertEquals(security.getCurrency(), actual.getCurrency());
assertEquals(security.getExchange(), actual.getExchange());
assertEquals(security.getExerciseType(), actual.getExerciseType());
assertEquals(security.getExpiry(), actual.getExpiry());
assertEquals(security.getExternalIdBundle(), actual.getExternalIdBundle());
assertEquals(security.getName(), actual.getName());
assertEquals(security.getOptionType(), actual.getOptionType());
assertEquals(security.getPointValue(), actual.getPointValue());
assertEquals(security.getSecurityType(), actual.getSecurityType());
assertEquals(security.getStrike(), actual.getStrike());
assertEquals(security.getUnderlyingId(), actual.getUnderlyingId());
assertNotNull(actual.getUniqueId());
//test underlying is loaded as well
ExternalId underlyingIdentifier = security.getUnderlyingId();
assertUnderlyingIsLoaded(underlyingIdentifier);
return null;
}
@Override
public Void visitEquityBarrierOptionSecurity(EquityBarrierOptionSecurity security) {
assertSecurity();
return null;
}
@Override
public Void visitFXOptionSecurity(FXOptionSecurity security) {
assertSecurity();
return null;
}
@Override
public Void visitNonDeliverableFXOptionSecurity(NonDeliverableFXOptionSecurity security) {
assertSecurity();
return null;
}
@Override
public Void visitSwaptionSecurity(SwaptionSecurity security) {
assertSecurity();
return null;
}
@Override
public Void visitIRFutureOptionSecurity(IRFutureOptionSecurity security) {
assertTrue(fromSecMaster instanceof IRFutureOptionSecurity);
IRFutureOptionSecurity actual = (IRFutureOptionSecurity) fromSecMaster;
assertEquals(security.getCurrency(), actual.getCurrency());
assertEquals(security.getExchange(), actual.getExchange());
assertEquals(security.getExerciseType(), actual.getExerciseType());
assertEquals(security.getExpiry(), actual.getExpiry());
assertEquals(security.isMargined(), actual.isMargined());
assertEquals(security.getOptionType(), actual.getOptionType());
assertEquals(security.getPointValue(), actual.getPointValue());
assertEquals(security.getStrike(), actual.getStrike());
assertEquals(security.getUnderlyingId(), actual.getUnderlyingId());
assertEquals(security.getExternalIdBundle(), actual.getExternalIdBundle());
assertEquals(security.getName(), actual.getName());
assertEquals(security.getSecurityType(), actual.getSecurityType());
assertNotNull(actual.getUniqueId());
//test underlying is loaded as well
ExternalId underlyingIdentifier = security.getUnderlyingId();
assertUnderlyingIsLoaded(underlyingIdentifier);
return null;
}
@Override
public Void visitCommodityFutureOptionSecurity(CommodityFutureOptionSecurity security) {
assertTrue(fromSecMaster instanceof CommodityFutureOptionSecurity);
CommodityFutureOptionSecurity actual = (CommodityFutureOptionSecurity) fromSecMaster;
assertEquals(security.getCurrency(), actual.getCurrency());
assertEquals(security.getTradingExchange(), actual.getTradingExchange());
assertEquals(security.getSettlementExchange(), actual.getSettlementExchange());
assertEquals(security.getExerciseType(), actual.getExerciseType());
assertEquals(security.getExpiry(), actual.getExpiry());
assertEquals(security.getOptionType(), actual.getOptionType());
assertEquals(security.getPointValue(), actual.getPointValue());
assertEquals(security.getStrike(), actual.getStrike());
assertEquals(security.getUnderlyingId(), actual.getUnderlyingId());
assertEquals(security.getExternalIdBundle(), actual.getExternalIdBundle());
assertEquals(security.getName(), actual.getName());
assertEquals(security.getSecurityType(), actual.getSecurityType());
assertNotNull(actual.getUniqueId());
//test underlying is loaded as well
ExternalId underlyingIdentifier = security.getUnderlyingId();
assertUnderlyingIsLoaded(underlyingIdentifier);
return null;
}
@Override
public Void visitFxFutureOptionSecurity(FxFutureOptionSecurity security) {
assertTrue(fromSecMaster instanceof FxFutureOptionSecurity);
FxFutureOptionSecurity actual = (FxFutureOptionSecurity) fromSecMaster;
assertEquals(security.getCurrency(), actual.getCurrency());
assertEquals(security.getTradingExchange(), actual.getTradingExchange());
assertEquals(security.getSettlementExchange(), actual.getSettlementExchange());
assertEquals(security.getExerciseType(), actual.getExerciseType());
assertEquals(security.getExpiry(), actual.getExpiry());
assertEquals(security.getOptionType(), actual.getOptionType());
assertEquals(security.getPointValue(), actual.getPointValue());
assertEquals(security.getStrike(), actual.getStrike());
assertEquals(security.getUnderlyingId(), actual.getUnderlyingId());
assertEquals(security.getExternalIdBundle(), actual.getExternalIdBundle());
assertEquals(security.getName(), actual.getName());
assertEquals(security.getSecurityType(), actual.getSecurityType());
assertNotNull(actual.getUniqueId());
//test underlying is loaded as well
ExternalId underlyingIdentifier = security.getUnderlyingId();
assertUnderlyingIsLoaded(underlyingIdentifier);
return null;
}
@Override
public Void visitEquityIndexDividendFutureOptionSecurity(EquityIndexDividendFutureOptionSecurity security) {
assertTrue(fromSecMaster instanceof EquityIndexDividendFutureOptionSecurity);
EquityIndexDividendFutureOptionSecurity actual = (EquityIndexDividendFutureOptionSecurity) fromSecMaster;
assertEquals(security.getCurrency(), actual.getCurrency());
assertEquals(security.getExchange(), actual.getExchange());
assertEquals(security.getExerciseType(), actual.getExerciseType());
assertEquals(security.getExpiry(), actual.getExpiry());
assertEquals(security.getOptionType(), actual.getOptionType());
assertEquals(security.getPointValue(), actual.getPointValue());
assertEquals(security.getStrike(), actual.getStrike());
assertEquals(security.isMargined(), actual.isMargined());
assertEquals(security.getUnderlyingId(), actual.getUnderlyingId());
assertEquals(security.getExternalIdBundle(), actual.getExternalIdBundle());
assertEquals(security.getName(), actual.getName());
assertEquals(security.getSecurityType(), actual.getSecurityType());
assertNotNull(actual.getUniqueId());
//test underlying is loaded as well
ExternalId underlyingIdentifier = security.getUnderlyingId();
assertUnderlyingIsLoaded(underlyingIdentifier);
return null;
}
@Override
public Void visitEquityIndexFutureOptionSecurity(final EquityIndexFutureOptionSecurity security) {
assertTrue(fromSecMaster instanceof EquityIndexFutureOptionSecurity);
EquityIndexFutureOptionSecurity actual = (EquityIndexFutureOptionSecurity) fromSecMaster;
assertEquals(security.getCurrency(), actual.getCurrency());
assertEquals(security.getExchange(), actual.getExchange());
assertEquals(security.getExerciseType(), actual.getExerciseType());
assertEquals(security.getExpiry(), actual.getExpiry());
assertEquals(security.getOptionType(), actual.getOptionType());
assertEquals(security.getPointValue(), actual.getPointValue());
assertEquals(security.getStrike(), actual.getStrike());
assertEquals(security.isMargined(), actual.isMargined());
assertEquals(security.getUnderlyingId(), actual.getUnderlyingId());
assertEquals(security.getExternalIdBundle(), actual.getExternalIdBundle());
assertEquals(security.getName(), actual.getName());
assertEquals(security.getSecurityType(), actual.getSecurityType());
assertNotNull(actual.getUniqueId());
//test underlying is loaded as well
ExternalId underlyingIdentifier = security.getUnderlyingId();
assertUnderlyingIsLoaded(underlyingIdentifier);
return null;