Fields Summary |
---|
private LoadEventListener[] | loadEventListeners |
private SaveOrUpdateEventListener[] | saveOrUpdateEventListeners |
private MergeEventListener[] | mergeEventListeners |
private PersistEventListener[] | persistEventListeners |
private PersistEventListener[] | persistOnFlushEventListeners |
private ReplicateEventListener[] | replicateEventListeners |
private DeleteEventListener[] | deleteEventListeners |
private AutoFlushEventListener[] | autoFlushEventListeners |
private DirtyCheckEventListener[] | dirtyCheckEventListeners |
private FlushEventListener[] | flushEventListeners |
private EvictEventListener[] | evictEventListeners |
private LockEventListener[] | lockEventListeners |
private RefreshEventListener[] | refreshEventListeners |
private FlushEntityEventListener[] | flushEntityEventListeners |
private InitializeCollectionEventListener[] | initializeCollectionEventListeners |
private PostLoadEventListener[] | postLoadEventListeners |
private PreLoadEventListener[] | preLoadEventListeners |
private PreDeleteEventListener[] | preDeleteEventListeners |
private PreUpdateEventListener[] | preUpdateEventListeners |
private PreInsertEventListener[] | preInsertEventListeners |
private PostDeleteEventListener[] | postDeleteEventListeners |
private PostUpdateEventListener[] | postUpdateEventListeners |
private PostInsertEventListener[] | postInsertEventListeners |
private PostDeleteEventListener[] | postCommitDeleteEventListeners |
private PostUpdateEventListener[] | postCommitUpdateEventListeners |
private PostInsertEventListener[] | postCommitInsertEventListeners |
private SaveOrUpdateEventListener[] | saveEventListeners |
private SaveOrUpdateEventListener[] | updateEventListeners |
private MergeEventListener[] | saveOrUpdateCopyEventListeners |
private static Map | eventInterfaceFromType |
Methods Summary |
---|
public AutoFlushEventListener[] | getAutoFlushEventListeners()
return autoFlushEventListeners;
|
public DeleteEventListener[] | getDeleteEventListeners()
return deleteEventListeners;
|
public DirtyCheckEventListener[] | getDirtyCheckEventListeners()
return dirtyCheckEventListeners;
|
public EvictEventListener[] | getEvictEventListeners()
return evictEventListeners;
|
public FlushEntityEventListener[] | getFlushEntityEventListeners()
return flushEntityEventListeners;
|
public FlushEventListener[] | getFlushEventListeners()
return flushEventListeners;
|
public InitializeCollectionEventListener[] | getInitializeCollectionEventListeners()
return initializeCollectionEventListeners;
|
public java.lang.Class | getListenerClassFor(java.lang.String type)
eventInterfaceFromType = new HashMap();
eventInterfaceFromType.put("auto-flush", AutoFlushEventListener.class);
eventInterfaceFromType.put("merge", MergeEventListener.class);
eventInterfaceFromType.put("create", PersistEventListener.class);
eventInterfaceFromType.put("create-onflush", PersistEventListener.class);
eventInterfaceFromType.put("delete", DeleteEventListener.class);
eventInterfaceFromType.put("dirty-check", DirtyCheckEventListener.class);
eventInterfaceFromType.put("evict", EvictEventListener.class);
eventInterfaceFromType.put("flush", FlushEventListener.class);
eventInterfaceFromType.put("flush-entity", FlushEntityEventListener.class);
eventInterfaceFromType.put("load", LoadEventListener.class);
eventInterfaceFromType.put("load-collection", InitializeCollectionEventListener.class);
eventInterfaceFromType.put("lock", LockEventListener.class);
eventInterfaceFromType.put("refresh", RefreshEventListener.class);
eventInterfaceFromType.put("replicate", ReplicateEventListener.class);
eventInterfaceFromType.put("save-update", SaveOrUpdateEventListener.class);
eventInterfaceFromType.put("save", SaveOrUpdateEventListener.class);
eventInterfaceFromType.put("update", SaveOrUpdateEventListener.class);
eventInterfaceFromType.put("pre-load", PreLoadEventListener.class);
eventInterfaceFromType.put("pre-update", PreUpdateEventListener.class);
eventInterfaceFromType.put("pre-delete", PreDeleteEventListener.class);
eventInterfaceFromType.put("pre-insert", PreInsertEventListener.class);
eventInterfaceFromType.put("post-load", PostLoadEventListener.class);
eventInterfaceFromType.put("post-update", PostUpdateEventListener.class);
eventInterfaceFromType.put("post-delete", PostDeleteEventListener.class);
eventInterfaceFromType.put("post-insert", PostInsertEventListener.class);
eventInterfaceFromType.put("post-commit-update", PostUpdateEventListener.class);
eventInterfaceFromType.put("post-commit-delete", PostDeleteEventListener.class);
eventInterfaceFromType.put("post-commit-insert", PostInsertEventListener.class);
eventInterfaceFromType = Collections.unmodifiableMap( eventInterfaceFromType );
Class clazz = (Class) eventInterfaceFromType.get(type);
if (clazz == null) {
throw new MappingException("Unrecognized listener type [" + type + "]");
}
return clazz;
|
public LoadEventListener[] | getLoadEventListeners()
return loadEventListeners;
|
public LockEventListener[] | getLockEventListeners()
return lockEventListeners;
|
public MergeEventListener[] | getMergeEventListeners()
return mergeEventListeners;
|
public PersistEventListener[] | getPersistEventListeners()
return persistEventListeners;
|
public PersistEventListener[] | getPersistOnFlushEventListeners()
return persistOnFlushEventListeners;
|
public PostDeleteEventListener[] | getPostCommitDeleteEventListeners()
return postCommitDeleteEventListeners;
|
public PostInsertEventListener[] | getPostCommitInsertEventListeners()
return postCommitInsertEventListeners;
|
public PostUpdateEventListener[] | getPostCommitUpdateEventListeners()
return postCommitUpdateEventListeners;
|
public PostDeleteEventListener[] | getPostDeleteEventListeners()
return postDeleteEventListeners;
|
public PostInsertEventListener[] | getPostInsertEventListeners()
return postInsertEventListeners;
|
public PostLoadEventListener[] | getPostLoadEventListeners()
return postLoadEventListeners;
|
public PostUpdateEventListener[] | getPostUpdateEventListeners()
return postUpdateEventListeners;
|
public PreDeleteEventListener[] | getPreDeleteEventListeners()
return preDeleteEventListeners;
|
public PreInsertEventListener[] | getPreInsertEventListeners()
return preInsertEventListeners;
|
public PreLoadEventListener[] | getPreLoadEventListeners()
return preLoadEventListeners;
|
public PreUpdateEventListener[] | getPreUpdateEventListeners()
return preUpdateEventListeners;
|
public RefreshEventListener[] | getRefreshEventListeners()
return refreshEventListeners;
|
public ReplicateEventListener[] | getReplicateEventListeners()
return replicateEventListeners;
|
public SaveOrUpdateEventListener[] | getSaveEventListeners()
return saveEventListeners;
|
public MergeEventListener[] | getSaveOrUpdateCopyEventListeners()
return saveOrUpdateCopyEventListeners;
|
public SaveOrUpdateEventListener[] | getSaveOrUpdateEventListeners()
return saveOrUpdateEventListeners;
|
public SaveOrUpdateEventListener[] | getUpdateEventListeners()
return updateEventListeners;
|
public void | initializeListeners(org.hibernate.cfg.Configuration cfg)Call initialize() on any listeners that implement
Initializable.
Field[] fields = getClass().getDeclaredFields();
for ( int i = 0; i < fields.length; i++ ) {
Object[] listeners;
try {
Object listener = fields[i].get(this);
if (listener instanceof Object[]) {
listeners = (Object[]) listener;
}
else {
continue;
}
}
catch (Exception e) {
throw new AssertionFailure("could not init listeners");
}
int length = listeners.length;
for (int index = 0 ; index < length ; index++) {
Object listener = listeners[index];
if (listener instanceof Initializable ) {
( (Initializable) listener ).initialize(cfg);
}
}
}
|
public void | setAutoFlushEventListeners(AutoFlushEventListener[] autoFlushEventListener)
this.autoFlushEventListeners = autoFlushEventListener;
|
public void | setDeleteEventListeners(DeleteEventListener[] deleteEventListener)
this.deleteEventListeners = deleteEventListener;
|
public void | setDirtyCheckEventListeners(DirtyCheckEventListener[] dirtyCheckEventListener)
this.dirtyCheckEventListeners = dirtyCheckEventListener;
|
public void | setEvictEventListeners(EvictEventListener[] evictEventListener)
this.evictEventListeners = evictEventListener;
|
public void | setFlushEntityEventListeners(FlushEntityEventListener[] flushEntityEventListener)
this.flushEntityEventListeners = flushEntityEventListener;
|
public void | setFlushEventListeners(FlushEventListener[] flushEventListener)
this.flushEventListeners = flushEventListener;
|
public void | setInitializeCollectionEventListeners(InitializeCollectionEventListener[] initializeCollectionEventListener)
this.initializeCollectionEventListeners = initializeCollectionEventListener;
|
public void | setLoadEventListeners(LoadEventListener[] loadEventListener)
this.loadEventListeners = loadEventListener;
|
public void | setLockEventListeners(LockEventListener[] lockEventListener)
this.lockEventListeners = lockEventListener;
|
public void | setMergeEventListeners(MergeEventListener[] mergeEventListener)
this.mergeEventListeners = mergeEventListener;
|
public void | setPersistEventListeners(PersistEventListener[] createEventListener)
this.persistEventListeners = createEventListener;
|
public void | setPersistOnFlushEventListeners(PersistEventListener[] createEventListener)
this.persistOnFlushEventListeners = createEventListener;
|
public void | setPostCommitDeleteEventListeners(PostDeleteEventListener[] postCommitDeleteEventListeners)
this.postCommitDeleteEventListeners = postCommitDeleteEventListeners;
|
public void | setPostCommitInsertEventListeners(PostInsertEventListener[] postCommitInsertEventListeners)
this.postCommitInsertEventListeners = postCommitInsertEventListeners;
|
public void | setPostCommitUpdateEventListeners(PostUpdateEventListener[] postCommitUpdateEventListeners)
this.postCommitUpdateEventListeners = postCommitUpdateEventListeners;
|
public void | setPostDeleteEventListeners(PostDeleteEventListener[] postDeleteEventListener)
this.postDeleteEventListeners = postDeleteEventListener;
|
public void | setPostInsertEventListeners(PostInsertEventListener[] postInsertEventListener)
this.postInsertEventListeners = postInsertEventListener;
|
public void | setPostLoadEventListeners(PostLoadEventListener[] postLoadEventListener)
this.postLoadEventListeners = postLoadEventListener;
|
public void | setPostUpdateEventListeners(PostUpdateEventListener[] postUpdateEventListener)
this.postUpdateEventListeners = postUpdateEventListener;
|
public void | setPreDeleteEventListeners(PreDeleteEventListener[] preDeleteEventListener)
this.preDeleteEventListeners = preDeleteEventListener;
|
public void | setPreInsertEventListeners(PreInsertEventListener[] preInsertEventListener)
this.preInsertEventListeners = preInsertEventListener;
|
public void | setPreLoadEventListeners(PreLoadEventListener[] preLoadEventListener)
this.preLoadEventListeners = preLoadEventListener;
|
public void | setPreUpdateEventListeners(PreUpdateEventListener[] preUpdateEventListener)
this.preUpdateEventListeners = preUpdateEventListener;
|
public void | setRefreshEventListeners(RefreshEventListener[] refreshEventListener)
this.refreshEventListeners = refreshEventListener;
|
public void | setReplicateEventListeners(ReplicateEventListener[] replicateEventListener)
this.replicateEventListeners = replicateEventListener;
|
public void | setSaveEventListeners(SaveOrUpdateEventListener[] saveEventListener)
this.saveEventListeners = saveEventListener;
|
public void | setSaveOrUpdateCopyEventListeners(MergeEventListener[] saveOrUpdateCopyEventListener)
this.saveOrUpdateCopyEventListeners = saveOrUpdateCopyEventListener;
|
public void | setSaveOrUpdateEventListeners(SaveOrUpdateEventListener[] saveOrUpdateEventListener)
this.saveOrUpdateEventListeners = saveOrUpdateEventListener;
|
public void | setUpdateEventListeners(SaveOrUpdateEventListener[] updateEventListener)
this.updateEventListeners = updateEventListener;
|