EntityChangeTrackerDefault

This object keeps track of all of the changes within a transaction, for entities for which entity property change publishing is enabled (typically using the DomainObject#entityChangePublishing() @DomainObject(entityChangePublishing=) annotation attribute.

The service is TransactionScope d and implements Spring’s TransactionSynchronization interface, meaning that Spring will call the #beforeCompletion() callback. This service also implements org.springframework.core.Ordered to ensure it isn’t called last by TransactionSynchronizationManager .

API

EntityChangeTrackerDefault.java
class EntityChangeTrackerDefault {
  int getOrder()
  void init()
  void destroy()
  Set<PropertyChangeRecord> snapshotPropertyChangeRecords()
  void beforeCompletion()
  Optional<EntityChanges> getEntityChanges(java.sql.Timestamp timestamp, String userName)
  Can<EntityPropertyChange> getPropertyChanges(java.sql.Timestamp timestamp, String userName, TransactionId txId)
  Interaction currentInteraction()
  long countPotentialPropertyChangeRecords()
  void enlistCreated(ManagedObject entity)
  void enlistUpdating(ManagedObject entity, Function<ManagedObject, Can<PropertyChangeRecord>> propertyChangeRecordSupplier)
  void enlistDeleting(ManagedObject entity)
  void incrementLoaded(ManagedObject entity)     (1)
  int numberEntitiesLoaded()
  int numberEntitiesDirtied()
}
1 incrementLoaded(ManagedObject)

Used only for the implementation of MetricsService .

Members

incrementLoaded(ManagedObject)

Used only for the implementation of MetricsService .