Package de.hybris.platform.tx
Class AfterSaveEventChangesCollector
- java.lang.Object
-
- de.hybris.platform.tx.AfterSaveEventChangesCollector
-
public class AfterSaveEventChangesCollector extends java.lang.ObjectCollects theAfterSaveEvents for each entity change.
-
-
Field Summary
Fields Modifier and Type Field Description protected intCREATE_DELETE_MASK
-
Constructor Summary
Constructors Constructor Description AfterSaveEventChangesCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clears the collected events.voidcollect(PK pk, int type)Collects the information when an item is created, updated, or removed.byte[][]getEncodedChanges()Retrieves all collectedAfterSaveEvents.protected intmergeChanges(int changesMask)protected booleanskipChanges(int changesMask)
-
-
-
Field Detail
-
CREATE_DELETE_MASK
protected final int CREATE_DELETE_MASK
- See Also:
- Constant Field Values
-
-
Method Detail
-
collect
public void collect(PK pk, int type)
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.
-
-