private Object fireMerge(MergeEvent event) { errorIfClosed(); checkTransactionSynchStatus(); MergeEventListener[] mergeEventListener = listeners.getMergeEventListeners(); for ( int i = 0; i < mergeEventListener.length; i++ ) { mergeEventListener[i].onMerge(event); } return event.getResult(); }
private void fireMerge(Map copiedAlready, MergeEvent event) { errorIfClosed(); checkTransactionSynchStatus(); MergeEventListener[] mergeEventListener = listeners.getMergeEventListeners(); for ( int i = 0; i < mergeEventListener.length; i++ ) { mergeEventListener[i].onMerge(event, copiedAlready); } }
private void fireSaveOrUpdateCopy(Map copiedAlready, MergeEvent event) { errorIfClosed(); checkTransactionSynchStatus(); MergeEventListener[] saveOrUpdateCopyEventListener = listeners.getSaveOrUpdateCopyEventListeners(); for ( int i = 0; i < saveOrUpdateCopyEventListener.length; i++ ) { saveOrUpdateCopyEventListener[i].onMerge(event, copiedAlready); } }
private Object fireSaveOrUpdateCopy(MergeEvent event) { errorIfClosed(); checkTransactionSynchStatus(); MergeEventListener[] saveOrUpdateCopyEventListener = listeners.getSaveOrUpdateCopyEventListeners(); for ( int i = 0; i < saveOrUpdateCopyEventListener.length; i++ ) { saveOrUpdateCopyEventListener[i].onMerge(event); } return event.getResult(); }
private void configureListeners(Ejb3Configuration cfg) { EventListeners eventListeners = cfg.getEventListeners(); cfg.setListeners("post-load", concatListeners(PostLoadEventListener.class, _postLoadEventListeners, eventListeners.getPostLoadEventListeners())); cfg.setListeners("save-update", concatListeners(SaveOrUpdateEventListener.class, _saveOrUpdateEventListeners, eventListeners.getSaveOrUpdateEventListeners())); cfg.setListeners("merge", concatListeners(MergeEventListener.class, _mergeEventListeners, eventListeners.getMergeEventListeners())); cfg.setListeners("create", concatListeners(PersistEventListener.class, _persistEventListeners, eventListeners.getPersistEventListeners())); // TODO: do we also need create-on-flush event? }
public List<MergeEventListener> getMergeEventListeners() { return _mergeEventListeners; }
public void setMergeEventListeners(List<MergeEventListener> mergeEventListeners) { _mergeEventListeners = mergeEventListeners; }