lumis.portal.event.persistence
Class PersistenceEvent

Package class diagram package PersistenceEvent
java.lang.Object
  extended by lumis.portal.event.AbstractPortalEvent
      extended by lumis.portal.event.AbstractTransactionalPortalEvent
          extended by lumis.portal.event.persistence.PersistenceEvent
All Implemented Interfaces:
IPortalEvent
Direct Known Subclasses:
PostAddEvent, PostDeleteEvent, PostLoadEvent, PostUpdateEvent, PreAddEvent, PreDeleteEvent, PreLoadEvent, PreUpdateEvent

@StableMinor(version="6.2",
             sinceVersion="4.2")
public abstract class PersistenceEvent
extends AbstractTransactionalPortalEvent

Base class for standard persistence events.

The groups for a standard persistence event is defined as being the class name of the corresponding entity.

Note: A persistence event may have been generated during a JPA entity lifecycle callback. In such situations, JPA limitations (such as the application should not access EntityManager, other entities, or change relations) apply.

Since:
4.1.0

Constructor Summary
PersistenceEvent(SessionConfig sessionConfig, Class<?> entityClass, Collection<?> entities, boolean before, ITransaction transaction)
           
 
Method Summary
 Collection<?> getEntities()
          Returns the entities affected by this persistence event.
 boolean isBefore()
          Indicates if this event was sent before the corresponding operation.
 
Methods inherited from class lumis.portal.event.AbstractTransactionalPortalEvent
getSessionConfig, getTransaction
 
Methods inherited from class lumis.portal.event.AbstractPortalEvent
getEventGroups, getOperationType, setEventGroups, setOperationType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface lumis.portal.event.IPortalEvent
toString
 

Constructor Detail

PersistenceEvent

public PersistenceEvent(SessionConfig sessionConfig,
                        Class<?> entityClass,
                        Collection<?> entities,
                        boolean before,
                        ITransaction transaction)
Method Detail

getEntities

public Collection<?> getEntities()
Returns the entities affected by this persistence event.

Returns:
the entities.
Since:
4.1.0

isBefore

public boolean isBefore()
Indicates if this event was sent before the corresponding operation.

Returns:
true if this event was sent before, or false if this event was sent after the corresponding operation.
Since:
4.1.0


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.