1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package net.wotonomy.control;
20
21 /***
22 * EOValidation provides methods for validating a operation
23 * on an object as a whole, rather than on an individual property.
24 *
25 * @author michael@mpowers.net
26 * @author $Author: cgruber $
27 * @version $Revision: 893 $
28 */
29 public interface EOValidation
30 {
31 /***
32 * Validates this object for delete.
33 * Throws an exception if this object cannot be deleted.
34 */
35 void validateForDelete();
36
37 /***
38 * Validates this object for insertion into the external store.
39 * Throws an exception if this object cannot be inserted.
40 * Validations here should be specific to insertion.
41 * Implementations may call validateForSave().
42 */
43 void validateForInsert();
44
45 /***
46 * Validates this object for a commit to the external store.
47 * Throws an exception if this object cannot be committed.
48 * Validations here are not specific to either inserts or updates.
49 */
50 void validateForSave();
51
52 /***
53 * Validates this object for update to the external store.
54 * Throws an exception if this object cannot be updated.
55 * Validations here should be specific to updates.
56 * Implementations may call validateForSave().
57 */
58 void validateForUpdate();
59 }
60
61
62
63
64
65
66
67
68
69
70
71
72