/** * Performs validation of the attributes. * * <p>Subclasses should override this method to validate * their attributes and invoke the parent method. * @throws IllegalArgumentException if <code>MessageId</code> < 0 * @throws IllegalArgumentException if <code>Timestamp</code> is <code>null</code> * @throws IllegalArgumentException if <code>Instrument</code> is <code>null</code> * @throws IllegalArgumentException if <code>MetaType</code> is <code>null</code> */ @Override public void validate() { super.validate(); if(instrument == null) { EventServices.error(Messages.VALIDATION_NULL_INSTRUMENT); } if(eventType == null) { EventServices.error(Messages.VALIDATION_NULL_META_TYPE); } } /* (non-Javadoc)
/** * Create a new LogEventImpl instance. * * @param inEvent an <code>EventBean</code> value * @param inLevel a <code>LogEventLevel</code> value * @param inMessage an <code>I18NMessage</code> value * @param inException a <code>Throwable</code> value * @param inParameters a <code>Serializable...</code> value * @throws IllegalArgumentException if <code>MessageId</code> < 0 * @throws IllegalArgumentException if <code>Timestamp</code> is <code>null</code> * @throws IllegalArgumentException if <code>Level</code> is <code>null</code> */ LogEventImpl(EventBean inEvent, LogEventLevel inLevel, I18NMessage inMessage, Throwable inException, Serializable... inParameters) { event = EventBean.copy(inEvent); event.setDefaults(); event.validate(); if(inLevel == null) { EventServices.error(VALIDATION_NULL_LOG_LEVEL); } level = inLevel; message = inMessage; exception = inException; parameters = inParameters; } /**
/** * Create a new TopOfBookImpl instance. * * @param inEvent an <code>EventBean</code> value * @param inInstrument an <code>Instrument</code> value * @param inBid a <code>BidEvent</code> value or <code>null</code> * @param inAsk an <code>AskEvent</code> value or <code>null</code> * @throws IllegalArgumentException if <code>MessageId</code> < 0 * @throws IllegalArgumentException if <code>Timestamp</code> is <code>null</code> * @throws IllegalArgumentException if <code>Instrument</code> is <code>null</code> */ TopOfBookEventImpl(EventBean inEvent, Instrument inInstrument, BidEvent inBid, AskEvent inAsk) { event = EventBean.copy(inEvent); event.setDefaults(); event.validate(); if(inInstrument == null) { EventServices.error(VALIDATION_NULL_INSTRUMENT); } instrument = inInstrument; bid = inBid; ask = inAsk; } /**
event.validate(); if(inInstrument == null) { EventServices.error(VALIDATION_NULL_INSTRUMENT);
public void validate() super.validate(); if(instrument == null) { EventServices.error(Messages.VALIDATION_NULL_INSTRUMENT);
public void validate() super.validate(); if(equity == null) { EventServices.error(Messages.VALIDATION_NULL_EQUITY);