Package de.hybris.platform.tx
Class AfterSaveEventChangesCollector
java.lang.Object
de.hybris.platform.tx.AfterSaveEventChangesCollector
Collects the
AfterSaveEvents for each entity change.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the collected events.voidCollects the information when an item is created, updated, or removed.byte[][]Retrieves all collectedAfterSaveEvents.protected intmergeChanges(int changesMask) protected booleanskipChanges(int changesMask)
-
Field Details
-
CREATE_DELETE_MASK
protected final int CREATE_DELETE_MASK- See Also:
-
-
Constructor Details
-
AfterSaveEventChangesCollector
public AfterSaveEventChangesCollector()
-
-
Method Details
-
collect
Collects the information when an item is created, updated, or removed.- Parameters:
pk- the pk of the itemtype- the operation on the item, must be eitherAfterSaveEvent.UPDATE,AfterSaveEvent.REMOVE, orAfterSaveEvent.CREATE
-
getEncodedChanges
public byte[][] getEncodedChanges()Retrieves all collectedAfterSaveEvents. NOTE: for a certain item, only one type is valid.- CREATE <-- CREATE
- CREATE <-- CREATE + UPDATE
- UPDATE <-- UPDATE
- REMOVE <-- UPDATE + REMOVE
- REMOVE <-- REMOVE
- NO ACTION <-- CREATE + UPDATE + REMOVE
- Returns:
- non-duplicated
AfterSaveEvents.
-
mergeChanges
protected int mergeChanges(int changesMask) -
skipChanges
protected boolean skipChanges(int changesMask) -
clear
public void clear()Clears the collected events.
-