Package org.hibernate.event.spi
Class AbstractPreDatabaseOperationEvent
- java.lang.Object
-
- org.hibernate.event.spi.AbstractEvent
-
- org.hibernate.event.spi.AbstractPreDatabaseOperationEvent
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
PreDeleteEvent
,PreInsertEvent
,PreUpdateEvent
,PreUpsertEvent
public abstract class AbstractPreDatabaseOperationEvent extends AbstractEvent
Represents an operation we are about to perform against the database.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractPreDatabaseOperationEvent(EventSource source, Object entity, Object id, EntityPersister persister)
Constructs an event containing the pertinent information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getEntity()
Retrieves the entity involved in the database operation.SessionFactoryImplementor
getFactory()
The factory which owns the persister for the entity.Object
getId()
The id to be used in the database operation.EntityPersister
getPersister()
The persister for the entity.-
Methods inherited from class org.hibernate.event.spi.AbstractEvent
getSession
-
-
-
-
Constructor Detail
-
AbstractPreDatabaseOperationEvent
public AbstractPreDatabaseOperationEvent(EventSource source, Object entity, Object id, EntityPersister persister)
Constructs an event containing the pertinent information.- Parameters:
source
- The session from which the event originated.entity
- The entity to be involved in the database operation.id
- The entity id to be involved in the database operation.persister
- The entity's persister.
-
-
Method Detail
-
getEntity
public Object getEntity()
Retrieves the entity involved in the database operation.- Returns:
- The entity.
-
getId
public Object getId()
The id to be used in the database operation.- Returns:
- The id.
-
getPersister
public EntityPersister getPersister()
The persister for the entity.- Returns:
- The entity persister.
-
getFactory
public SessionFactoryImplementor getFactory()
The factory which owns the persister for the entity.- Overrides:
getFactory
in classAbstractEvent
- Returns:
- The factory
-
-