Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||||
EOValidation |
|
| 1.0;1 |
1 | /* |
|
2 | Wotonomy: OpenStep design patterns for pure Java applications. |
|
3 | Copyright (C) 2001 Michael Powers |
|
4 | ||
5 | This library is free software; you can redistribute it and/or |
|
6 | modify it under the terms of the GNU Lesser General Public |
|
7 | License as published by the Free Software Foundation; either |
|
8 | version 2.1 of the License, or (at your option) any later version. |
|
9 | ||
10 | This library is distributed in the hope that it will be useful, |
|
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13 | Lesser General Public License for more details. |
|
14 | ||
15 | You should have received a copy of the GNU Lesser General Public |
|
16 | License along with this library; if not, see http://www.gnu.org |
|
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 | * $Log$ |
|
63 | * Revision 1.1 2006/02/16 13:19:57 cgruber |
|
64 | * Check in all sources in eclipse-friendly maven-enabled packages. |
|
65 | * |
|
66 | * Revision 1.1 2001/11/13 04:13:59 mpowers |
|
67 | * Added interfaces needed to begin work on EOCustomObject. |
|
68 | * |
|
69 | * |
|
70 | */ |
|
71 | ||
72 |