public abstract class AbstractPreDatabaseOperationEvent extends AbstractEvent implements PermissionCheckEntityInformation
Represents an operation we are about to perform against the database.
| Constructor and Description |
|---|
AbstractPreDatabaseOperationEvent(EventSource source,
Object entity,
Serializable id,
EntityPersister persister)
Constructs an event containing the pertinent information.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
getEntity()
Retrieves the entity involved in the database operation.
|
String |
getEntityName() |
Serializable |
getId()
The id to be used in the database operation.
|
Serializable |
getIdentifier() |
EntityPersister |
getPersister()
The persister for the
entity. |
EventSource |
getSource()
Deprecated.
Use
AbstractEvent.getSession() instead |
getSessionpublic AbstractPreDatabaseOperationEvent(EventSource source, Object entity, Serializable id, EntityPersister persister)
Constructs an event containing the pertinent information.
source - The session from which the event originated.entity - The entity to be invloved in the database operation.id - The entity id to be invloved in the database operation.persister - The entity’s persister.public Object getEntity()
Retrieves the entity involved in the database operation.
getEntity in interface PermissionCheckEntityInformationpublic Serializable getId()
The id to be used in the database operation.
public EntityPersister getPersister()
The persister for the entity.
@Deprecated public EventSource getSource()
AbstractEvent.getSession() insteadGetter for property 'source'. This is the session from which the event
originated.
<p/>
Some of the pre-* events had previous exposed the event source using
getSource() because they had not originally extended from
AbstractEvent.
public String getEntityName()
getEntityName in interface PermissionCheckEntityInformationpublic Serializable getIdentifier()
getIdentifier in interface PermissionCheckEntityInformationCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.