1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.exoplatform.wiki.chromattic.ext.ntdef;
18
19 import org.chromattic.api.RelationshipType;
20 import org.chromattic.api.annotations.ManyToOne;
21 import org.chromattic.api.annotations.MappedBy;
22 import org.chromattic.api.annotations.MixinType;
23 import org.chromattic.api.annotations.OneToOne;
24 import org.chromattic.api.annotations.Property;
25 import org.exoplatform.wiki.mow.core.api.wiki.AttachmentImpl;
26
27 @MixinType(name = "mix:versionable")
28 public abstract class VersionableMixin {
29
30 @OneToOne(type = RelationshipType.EMBEDDED)
31 public abstract AttachmentImpl getEntity();
32
33 public abstract void setEntity(AttachmentImpl page);
34
35 @ManyToOne(type = RelationshipType.REFERENCE)
36 @MappedBy("jcr:versionHistory")
37 public abstract NTVersionHistory getVersionHistory();
38
39 @ManyToOne(type = RelationshipType.REFERENCE)
40 @MappedBy("jcr:baseVersion")
41 public abstract NTVersion getBaseVersion();
42
43 @Property(name = "jcr:isCheckedOut")
44 public abstract boolean isCheckedOut();
45
46 @Property(name = "jcr:predecessors")
47 public abstract String[] getPredecessors();
48
49 }