1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package javax.jdo.annotations;
18
19 import java.lang.annotation.ElementType;
20 import java.lang.annotation.Retention;
21 import java.lang.annotation.RetentionPolicy;
22 import java.lang.annotation.Target;
23
24 /**
25 * Annotation for whether the class or interface is persistence-capable.
26 *
27 * @version 2.1
28 * @since 2.1
29 */
30 @Target(ElementType.TYPE)
31 @Retention(RetentionPolicy.RUNTIME)
32 public @interface PersistenceCapable
33 {
34 /** Member declarations. Annotations for persistent members of this
35 * class or interface can be specifed either here or on each member.
36 * Annotations for inherited members can only be specified here.
37 * @return member declarations
38 */
39 Persistent[] members() default {};
40
41 /** Table to use for persisting this class or interface.
42 */
43 String table() default "";
44
45 /** Catalog to use for persisting this class or interface.
46 */
47 String catalog() default "";
48
49 /** Schema to use for persisting this class or interface.
50 */
51 String schema() default "";
52
53 /** Whether this class or interface manages an extent.
54 */
55 String requiresExtent() default "";
56
57 /** Whether objects of this class or interface can only be embedded.
58 */
59 String embeddedOnly() default "";
60
61 /** Whether this class or interface is detachable.
62 */
63 String detachable() default "";
64
65 /** Type of identity for this class or interface.
66 */
67 IdentityType identityType() default IdentityType.UNSPECIFIED;
68
69 /** Primary key class when using application identity and using own PK.
70 */
71 Class objectIdClass() default void.class;
72
73 /** Whether this class is cacheable in a Level2 cache.
74 * @since 2.2
75 */
76 String cacheable() default "true";
77
78 /** Whether objects of this type should, by default, be locked when read.
79 * @since 3.0
80 */
81 String serializeRead() default "false";
82
83 /** Any vendor extensions.
84 */
85 Extension[] extensions() default {};
86 }