Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
ModelObject |
|
| 1.0;1 |
1 | /* | |
2 | * Created on Aug 11, 2007 by wyatt | |
3 | */ | |
4 | package org.homeunix.thecave.buddi.model; | |
5 | ||
6 | import java.util.Date; | |
7 | ||
8 | import org.homeunix.thecave.buddi.plugin.api.exception.InvalidValueException; | |
9 | ||
10 | public interface ModelObject extends Comparable<ModelObject> { | |
11 | ||
12 | public int compareTo(ModelObject o); | |
13 | ||
14 | /** | |
15 | * Returns the document associated with this model object, or null if | |
16 | * there is no document. | |
17 | * @return | |
18 | */ | |
19 | public Document getDocument(); | |
20 | ||
21 | /** | |
22 | * Returns the UID string for this object. | |
23 | * @return | |
24 | */ | |
25 | public String getUid(); | |
26 | ||
27 | /** | |
28 | * Sets the object as modified. Optionally will fire a change event, if the change | |
29 | * is major enough to warrant it. | |
30 | */ | |
31 | public void setChanged(); | |
32 | ||
33 | /** | |
34 | * Gets the last modified date of the object | |
35 | * @return | |
36 | */ | |
37 | public Date getModified(); | |
38 | ||
39 | /** | |
40 | * Sets the document. | |
41 | * @param document | |
42 | */ | |
43 | public void setDocument(Document document) throws InvalidValueException; | |
44 | } |