1 | public class PreDeleteEvent extends AbstractPreDatabaseOperationEvent {↵ | | 1 | public class PreInsertEvent extends AbstractPreDatabaseOperationEvent {↵
|
2 | private Object[] deletedState;↵ | | 2 | private Object[] state;↵
|
|
3 | /**↵ | | 3 | /**↵
|
4 | *↵ | | 4 | ↵
|
5 | * Constructs an event containing the pertinent information.↵ | | 5 | * Constructs an event containing the pertinent information.↵
|
6 | *↵ | | 6 | *↵
|
7 | * @param entity The entity to be deleted.↵ | | 7 | * @param entity The entity to be inserted.↵
|
8 | * @param id The id to use in the deletion.↵ | | 8 | * @param id The id to use in the insertion.↵
|
9 | * @param deletedState The entity's state at deletion time.↵ | | 9 | * @param state The state to be inserted.↵
|
10 | * @param persister The entity's persister.↵ | | 10 | * @param persister The entity's persister.↵
|
11 | * @param source The session from which the event originated.↵ | | 11 | * @param source The session from which the event originated.↵
|
12 | */↵ | | 12 | */↵
|
13 | public PreDeleteEvent(↵ | | 13 | public PreInsertEvent(↵
|
14 | Object entity,↵ | | 14 | Object entity,↵
|
15 | Serializable id,↵ | | 15 | Serializable id,↵
|
16 | Object[] deletedState,↵ | | 16 | Object[] state,↵
|
17 | EntityPersister persister,↵ | | 17 | EntityPersister persister,↵
|
18 | EventSource source) {↵ | | 18 | EventSource source) {↵
|
19 | super( source, entity, id, persister );↵ | | 19 | super( source, entity, id, persister );↵
|
20 | this.deletedState = deletedState;↵ | | 20 | this.state = state;↵
|
21 | }↵ | | 21 | }↵
|
|
22 | /**↵ | | 22 | /**↵
|
23 | * Getter for property 'deletedState'. This is the entity state at the↵ | | 23 | * Getter for property 'state'. These are the↵
|
24 | * time of deletion (useful for optomistic locking and such).↵ | | 24 | values to be inserted.↵
|
25 | *↵ | | 25 | *↵
|
26 | * @return Value for property 'deletedState'.↵ | | 26 | * @return Value for property 'state'.↵
|
27 | */↵ | | 27 | */↵
|
28 | public Object[] getDeletedState() {↵ | | 28 | public Object[] getState() {↵
|
29 | return deletedState;↵ | | 29 | return state;↵
|
30 | | | 30 |
|