1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package mnemosyne.core;
17
18 import java.io.Serializable;
19
20 /***
21 * Implementation of Persistable for classes which want to provide their own
22 * method "interception", rather than letting the AOP system do it. This is
23 * mainly useful for core classes that must always be Persistable (such as
24 * "PersistentRootImpl") as it prevents the core classes from having to be tied
25 * particular aop system by the user.
26 *
27 * @version $Id: NonAopPersistable.java,v 1.1 2004/08/12 14:01:05 charlesblaxland Exp $
28 */
29 public class NonAopPersistable implements Persistable, Cloneable, Serializable
30 {
31 private transient PersistentObject persistentObject;
32 private transient boolean archiveVersion = false;
33
34 public PersistentObject getPersistentObject()
35 {
36 return persistentObject;
37 }
38
39 public void setPersistentObject(PersistentObject persistentObject)
40 {
41 this.persistentObject = persistentObject;
42 }
43
44 public boolean isPersistent()
45 {
46 return persistentObject != null;
47 }
48
49 public boolean isArchiveVersion()
50 {
51 return archiveVersion;
52 }
53
54 public void setArchiveVersion(boolean archiveVersion)
55 {
56 this.archiveVersion = archiveVersion;
57 }
58 }