Package de.hybris.platform.tx
Class AfterSaveEvent
- java.lang.Object
-
- de.hybris.platform.tx.AfterSaveEvent
-
public class AfterSaveEvent extends java.lang.ObjectAnAfterSaveEventis created after a database operation on an item. ThePKof the item is recorded, and the type as well. There are three types supported:UPDATE,REMOVE, andCREATE.-
Rules to create an
- for
CREATE: create + update(*) - for
UPDATE: update(+) - for
REMOVE: update(*) + remove
AfterSaveEventwhen transaction is used and multiple operations have been executed on the SAME item(Note: all of the operations are executed between one BEGIN and COMMIT database action):-
NO
- create + update(*) + remove
AfterSaveEventwill be created when the transaction rolls back as well as under the following situation:If there is no active transaction, each database operation on the item needs to be recorded so that an
AfterSaveEventwill be created. - for
-
-
Constructor Summary
Constructors Constructor Description AfterSaveEvent(PK pk, int type)Creates the AfterSaveEvent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)PKgetPk()intgetType()inthashCode()java.lang.StringtoString()
-
-
-
Field Detail
-
UPDATE
public static final int UPDATE
- See Also:
- Constant Field Values
-
REMOVE
public static final int REMOVE
- See Also:
- Constant Field Values
-
CREATE
public static final int CREATE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPk
public PK getPk()
-
getType
public int getType()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-