public interface EntityLogServiceLocal extends EntityLogService
| Modifier and Type | Method and Description |
|---|---|
<E extends BaseEntity> |
createPropertyLogs(E oldEntity,
E newEntity,
org.cyclos.impl.EntityLogManager handler)
For each DTO's property it reads the old value (from oldEntity) and the new one (from newEntity) and compares if
they are different.
|
<E extends BaseEntity> |
getEntityLogEvent(E oldEntity,
E newEntity)
Calculates the
EntityLogEvent according to the old and new entities. |
void |
log(java.lang.String entityName,
long entityId,
java.lang.Long ownerEntityId,
EntityLogType type,
EntityLogEvent event,
java.util.List<EntityPropertyLog> propertyLogs)
Creates and persists a new
EntityLog with the provided parameters. |
load, search<E extends BaseEntity> java.util.List<EntityPropertyLog> createPropertyLogs(E oldEntity, E newEntity, org.cyclos.impl.EntityLogManager handler)
EntityPropertyLog to be added to
the result. At least oldEntity or newEntity must be not null.EntityLogEvent is calculated according to the following rules in the following order:
EntityLogEvent.UPDATE>
EntityLogEvent.DELETE>
EntityLogEvent.CREATE>
EntityLogManager is used to allow log customization.java.lang.IllegalArgumentException - if both oldEntity and newEntity are null.<E extends BaseEntity> EntityLogEvent getEntityLogEvent(E oldEntity, E newEntity)
EntityLogEvent according to the old and new entities.void log(java.lang.String entityName,
long entityId,
java.lang.Long ownerEntityId,
EntityLogType type,
EntityLogEvent event,
java.util.List<EntityPropertyLog> propertyLogs)
EntityLog with the provided parameters.