Package org.hibernate.event.spi
Class EventType<T>
java.lang.Object
org.hibernate.event.spi.EventType<T>
Enumeration of the recognized types of events, including meta-information about each.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EventType<AutoFlushEventListener>
static final EventType<ClearEventListener>
static final EventType<DeleteEventListener>
static final EventType<DirtyCheckEventListener>
static final EventType<EvictEventListener>
static final EventType<FlushEventListener>
static final EventType<FlushEntityEventListener>
static final EventType<InitializeCollectionEventListener>
static final EventType<LoadEventListener>
static final EventType<LockEventListener>
static final EventType<MergeEventListener>
static final EventType<PersistEventListener>
static final EventType<PersistEventListener>
static final EventType<PostCollectionRecreateEventListener>
static final EventType<PostCollectionRemoveEventListener>
static final EventType<PostCollectionUpdateEventListener>
static final EventType<PostDeleteEventListener>
static final EventType<PostInsertEventListener>
static final EventType<PostUpdateEventListener>
static final EventType<PostDeleteEventListener>
static final EventType<PostInsertEventListener>
static final EventType<PostLoadEventListener>
static final EventType<PostUpdateEventListener>
static final EventType<PostUpsertEventListener>
static final EventType<PreCollectionRecreateEventListener>
static final EventType<PreCollectionRemoveEventListener>
static final EventType<PreCollectionUpdateEventListener>
static final EventType<PreDeleteEventListener>
static final EventType<PreInsertEventListener>
static final EventType<PreLoadEventListener>
static final EventType<PreUpdateEventListener>
static final EventType<PreUpsertEventListener>
static final EventType<RefreshEventListener>
static final EventType<ReplicateEventListener>
static final EventType<ResolveNaturalIdEventListener>
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> EventType<T>
boolean
Is this event-type one of the standard event-types?int
ordinal()
EventType is effectively an enumeration.static EventType<?>
resolveEventTypeByName
(String eventName) Find anEventType
by its nametoString()
static Collection<EventType<?>>
values()
Get a collection of all the standardEventType
instances.
-
Field Details
-
LOAD
-
RESOLVE_NATURAL_ID
-
INIT_COLLECTION
-
PERSIST
-
PERSIST_ONFLUSH
-
MERGE
-
DELETE
-
REPLICATE
-
FLUSH
-
AUTO_FLUSH
-
DIRTY_CHECK
-
FLUSH_ENTITY
-
CLEAR
-
EVICT
-
LOCK
-
REFRESH
-
PRE_LOAD
-
PRE_DELETE
-
PRE_UPDATE
-
PRE_INSERT
-
PRE_UPSERT
-
POST_LOAD
-
POST_DELETE
-
POST_UPDATE
-
POST_INSERT
-
POST_UPSERT
-
POST_COMMIT_DELETE
-
POST_COMMIT_UPDATE
-
POST_COMMIT_INSERT
-
PRE_COLLECTION_RECREATE
-
PRE_COLLECTION_REMOVE
-
PRE_COLLECTION_UPDATE
-
POST_COLLECTION_RECREATE
-
POST_COLLECTION_REMOVE
-
POST_COLLECTION_UPDATE
-
-
Method Details
-
create
-
resolveEventTypeByName
Find anEventType
by its name- Parameters:
eventName
- The name- Returns:
- The
EventType
instance. - Throws:
HibernateException
- If eventName is null, or if eventName does not correlate to any known event type.
-
values
Get a collection of all the standardEventType
instances. -
eventName
-
baseListenerInterface
-
ordinal
public int ordinal()EventType is effectively an enumeration. Since there is a known, limited number of possible types, we expose an ordinal for each in order to be able to efficiently do associations elsewhere in the codebase (array vs. Map) For the total number of types, seevalues()
- Returns:
- A unique ordinal for this
EventType
, starting at 0 and up to the number of distinct events
-
isStandardEvent
public boolean isStandardEvent()Is this event-type one of the standard event-types? -
toString
-