1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package javax.jdo.listener;
23
24 /***
25 * This interface is implemented by listeners to be notified of
26 * clear events.
27 * @version 2.0
28 * @since 2.0
29 */
30 public interface ClearLifecycleListener
31 extends InstanceLifecycleListener {
32
33 /***
34 * This method is called before the implementation calls the instance
35 * method {@link ClearCallback#jdoPreClear} and before it clears the values
36 * in the instance to their Java default values. This happens during
37 * an application call to evict, and in afterCompletion for commit
38 * with RetainValues false and rollback with RestoreValues false.
39 * <P>The method is called during any state transition to hollow.
40 * Non-persistent, non-transactional fields should be cleared
41 * in this method. Associations between this instance and others
42 * in the runtime environment should be cleared.
43 * <P>This method is not modified by the enhancer, so access to fields
44 * is not mediated.
45 * @param event the clear event.
46 * @since 2.0
47 */
48 void preClear (InstanceLifecycleEvent event);
49
50 /***
51 * This method is called after the {@link ClearCallback#jdoPreClear}
52 * method is invoked on the instance and the fields have been cleared
53 * by the JDO implementation.
54 * @param event the clear event.
55 * @since 2.0
56 */
57 void postClear (InstanceLifecycleEvent event);
58 }