@StableMinor(version="12.3", sinceVersion="4.2") public class PreUpdateEvent extends PersistenceEvent
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.
Constructor and Description |
---|
PreUpdateEvent(SessionConfig sessionConfig,
Class<?> entityClass,
List<?> oldEntities,
List<?> newEntities,
ITransaction transaction) |
PreUpdateEvent(SessionConfig sessionConfig,
Class<?> entityClass,
Object oldEntity,
Object entity,
ITransaction transaction) |
Modifier and Type | Method and Description |
---|---|
List<?> |
getEntities()
Returns the entities affected by this persistence event.
|
List<?> |
getOldEntities()
Returns the entity state before the update.
|
isBefore
getSessionConfig, getTransaction
getEventGroups, getOperationType, setEventGroups, setOperationType
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toString
public PreUpdateEvent(SessionConfig sessionConfig, Class<?> entityClass, Object oldEntity, Object entity, ITransaction transaction)
public PreUpdateEvent(SessionConfig sessionConfig, Class<?> entityClass, List<?> oldEntities, List<?> newEntities, ITransaction transaction)
public List<?> getEntities()
PersistenceEvent
getEntities
in class PersistenceEvent
public List<?> getOldEntities()
getEntities()
.
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.
LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.