@Override public Instrument getInstrument() { return marketstat.getInstrument(); } /* (non-Javadoc)
@Override public MarketstatEvent create() { if(!(getMarketstat().getInstrument() instanceof Equity)) { throw new IllegalArgumentException(VALIDATION_EQUITY_REQUIRED.getText()); } return new EquityMarketstatEventImpl(getMarketstat()); } };
@Override public MarketstatEvent create() { if(!(getMarketstat().getInstrument() instanceof Currency)) { throw new IllegalArgumentException(VALIDATION_CURRENCY_REQUIRED.getText()); } return new CurrencyMarketstatEventImpl(getMarketstat(),getCurrency()); } };
@Override public MarketstatEvent create() { if(!(getMarketstat().getInstrument() instanceof ConvertibleBond)) { throw new IllegalArgumentException(VALIDATION_BOND_REQUIRED.getText()); } return new ConvertibleBondMarketstatEventImpl(getMarketstat(), getConvertibleBond()); } };
@Override public MarketstatEvent create() { if(!(getMarketstat().getInstrument() instanceof Future)) { throw new IllegalArgumentException(VALIDATION_FUTURE_REQUIRED.getText()); } return new FutureMarketstatEventImpl(getMarketstat(), getFuture()); } };
@Override public MarketstatEvent create() { if(!(getMarketstat().getInstrument() instanceof Option)) { throw new IllegalArgumentException(VALIDATION_OPTION_REQUIRED.getText()); } return new OptionMarketstatEventImpl(getMarketstat(), getOption(), getVolumeChange(), getInterestChange()); } };
/** * Copies all member attributes from the donor to the recipient. * * @param inDonor a <code>MarketstatBean</code> value * @param inRecipient a <code>MarketstatBean</code> value */ protected static void copyAttributes(MarketstatBean inDonor, MarketstatBean inRecipient) { EventBean.copyAttributes(inDonor, inRecipient); inRecipient.setEventType(inDonor.getEventType()); inRecipient.setClose(inDonor.getClose()); inRecipient.setCloseDate(inDonor.getCloseDate()); inRecipient.setCloseExchange(inDonor.getCloseExchange()); inRecipient.setHigh(inDonor.getHigh()); inRecipient.setHighExchange(inDonor.getHighExchange()); inRecipient.setInstrument(inDonor.getInstrument()); inRecipient.setLow(inDonor.getLow()); inRecipient.setLowExchange(inDonor.getLowExchange()); inRecipient.setOpen(inDonor.getOpen()); inRecipient.setOpenExchange(inDonor.getOpenExchange()); inRecipient.setPreviousClose(inDonor.getPreviousClose()); inRecipient.setPreviousCloseDate(inDonor.getPreviousCloseDate()); inRecipient.setTradeHighTime(inDonor.getTradeHighTime()); inRecipient.setTradeLowTime(inDonor.getTradeLowTime()); inRecipient.setVolume(inDonor.getVolume()); inRecipient.setValue(inDonor.getValue()); } /**