Package de.hybris.platform.tx
Class AfterSaveEventChangesCollector
- java.lang.Object
-
- de.hybris.platform.tx.AfterSaveEventChangesCollector
-
public class AfterSaveEventChangesCollector extends java.lang.Object
Collects theAfterSaveEvent
s for each entity change.
-
-
Field Summary
Fields Modifier and Type Field Description protected int
CREATE_DELETE_MASK
-
Constructor Summary
Constructors Constructor Description AfterSaveEventChangesCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clears the collected events.void
collect(PK pk, int type)
Collects the information when an item is created, updated, or removed.byte[][]
getEncodedChanges()
Retrieves all collectedAfterSaveEvent
s.protected int
mergeChanges(int changesMask)
protected boolean
skipChanges(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 collectedAfterSaveEvent
s. 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
AfterSaveEvent
s.
-
mergeChanges
protected int mergeChanges(int changesMask)
-
skipChanges
protected boolean skipChanges(int changesMask)
-
clear
public void clear()
Clears the collected events.
-
-