Top Description Fields Constructors Methods
org.hibernate.event

public abstract Class AbstractPreDatabaseOperationEvent

extends AbstractEvent
Class Inheritance
Known Direct Subclasses
org.hibernate.event.PreDeleteEvent, org.hibernate.event.PreInsertEvent, org.hibernate.event.PreUpdateEvent
Imports
java.io.Serializable, org.hibernate.persister.entity.EntityPersister

Represents an operation we are about to perform against the database.
Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final Object
private final Serializable
private final EntityPersister

Constructor Summary

AccessConstructor and Description
public
AbstractPreDatabaseOperationEvent(EventSource
The session from which the event originated.
source
,
Object
The entity to be invloved in the database operation.
entity
,
Serializable
The entity id to be invloved in the database operation.
id
,
EntityPersister
The entity's persister.
persister
)

Constructs an event containing the pertinent information.

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

The entity.
getEntity
()

Retrieves the entity involved in the database operation.

public Serializable

Returns:

The id.
getId
()

The id to be used in the database operation.

public EntityPersister

Returns:

The entity persister.
getPersister
()

The persister for the entity.

public EventSource

Returns:

Value for property 'source'.
getSource
()

Deprecated Use getSession instead
Getter for property 'source'.
Inherited from org.hibernate.event.AbstractEvent:
getSession

Field Detail

entityback to summary
private final Object entity
idback to summary
private final Serializable id
persisterback to summary
private final EntityPersister persister

Constructor Detail

AbstractPreDatabaseOperationEventback to summary
public AbstractPreDatabaseOperationEvent(EventSource source, Object entity, Serializable id, EntityPersister persister)

Constructs an event containing the pertinent information.

Parameters
source:EventSource

The session from which the event originated.

entity:Object

The entity to be invloved in the database operation.

id:Serializable

The entity id to be invloved in the database operation.

persister:EntityPersister

The entity's persister.

Method Detail

getEntityback to summary
public Object getEntity()

Retrieves the entity involved in the database operation.

Returns:Object

The entity.

getIdback to summary
public Serializable getId()

The id to be used in the database operation.

Returns:Serializable

The id.

getPersisterback to summary
public EntityPersister getPersister()

The persister for the entity.

Returns:EntityPersister

The entity persister.

getSourceback to summary
public EventSource getSource()

Deprecated

Use getSession instead

Getter for property 'source'. This is the session from which the event originated.

Some of the pre-* events had previous exposed the event source using getSource() because they had not originally extended from AbstractEvent.

Returns:EventSource

Value for property 'source'.