Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

    public abstract class AbstractPreDatabaseOperationEvent

extends AbstractEvent

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

See Also:
  Serialized Form

Constructor Summary
`AbstractPreDatabaseOperationEvent(EventSource source, Object entity, Serializable id, EntityPersister persister)` Constructs an event containing the pertinent information.

Method Summary
`Object` | `getEntity()` Retrieves the entity involved in the database operation.
`Serializable` | `getId()` The id to be used in the database operation.
`EntityPersister` | `getPersister()` The persister for the `entity`.
`EventSource` | `getSource()` Deprecated. Use `AbstractEvent.getSession()` instead

Methods inherited from class org.hibernate.event.spi.AbstractEvent
`getSession`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AbstractPreDatabaseOperationEvent

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

  Constructs an event containing the pertinent information.

  Parameters:
    `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.

Method Detail

### getEntity

    public Object getEntity()

  Retrieves the entity involved in the database operation.

  Returns:
    The entity.

### getId

    public Serializable 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.

### getSource

    public EventSource getSource()

  Deprecated. Use `AbstractEvent.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:
    Value for property 'source'.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.