Package lumis.portal.event.persistence
Class PreUpdateEvent
- java.lang.Object
-
- lumis.portal.event.AbstractPortalEvent
-
- lumis.portal.event.AbstractTransactionalPortalEvent
-
- lumis.portal.event.persistence.PersistenceEvent
-
- lumis.portal.event.persistence.PreUpdateEvent
-
- All Implemented Interfaces:
IPortalEvent
@StableMinor(version="14.0", sinceVersion="4.2") public class PreUpdateEvent extends PersistenceEvent
Event raised before the update of an entity in persistence.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
- Version:
- $Revision: 24477 $ $Date: 2021-04-28 11:30:36 -0300 (Wed, 28 Apr 2021) $
-
-
Constructor Summary
Constructors Constructor Description PreUpdateEvent(SessionConfig sessionConfig, Class<?> entityClass, Object oldEntity, Object entity, ITransaction transaction)
PreUpdateEvent(SessionConfig sessionConfig, Class<?> entityClass, List<?> oldEntities, List<?> newEntities, ITransaction transaction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<?>
getEntities()
Returns the entities affected by this persistence event.List<?>
getOldEntities()
Returns the entity state before the update.-
Methods inherited from class lumis.portal.event.persistence.PersistenceEvent
isBefore
-
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
-
PreUpdateEvent
public PreUpdateEvent(SessionConfig sessionConfig, Class<?> entityClass, Object oldEntity, Object entity, ITransaction transaction)
-
PreUpdateEvent
public PreUpdateEvent(SessionConfig sessionConfig, Class<?> entityClass, List<?> oldEntities, List<?> newEntities, ITransaction transaction)
-
-
Method Detail
-
getEntities
public List<?> getEntities()
Description copied from class:PersistenceEvent
Returns the entities affected by this persistence event.- Overrides:
getEntities
in classPersistenceEvent
- Returns:
- the entities.
-
getOldEntities
public List<?> getOldEntities()
Returns the entity state before the update. Each entity in the list returned corresponds to the entity in the same index of the list returned bygetEntities()
.Note that this information may not be available in the event, depending on who generated the event. In this case, this method will return null.
- Returns:
- the entity state before the update.
- Since:
- 4.1.0
-
-