1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package javax.jdo.spi;
24
25 import java.util.EventObject;
26
27 /**
28 * A <code>RegisterClassEvent</code> event gets delivered whenever a persistence-capable
29 * class registers itself with the <code>JDOImplHelper</code>.
30 *
31 * @version 1.0
32 */
33 public class RegisterClassEvent
34 extends EventObject
35 {
36 /** The class object of the registered persistence-capable class */
37 protected Class pcClass;
38
39 /** The names of managed fields of the persistence-capable class */
40 protected String[] fieldNames;
41
42 /** The types of managed fields of the persistence-capable class */
43 protected Class[] fieldTypes;
44
45 /** The flags of managed fields of the persistence-capable class */
46 protected byte[] fieldFlags;
47
48 /** */
49 protected Class persistenceCapableSuperclass;
50
51 /**
52 * Constructs a new <code>RegisterClassEvent</code>.
53 * @param helper the <code>JDOImplHelper</code> instance
54 * @param registeredClass the persistence-capable class
55 * @param fieldNames the names of the managed fields
56 * @param fieldTypes the types of the managed fields
57 * @param fieldFlags the flags of the managed fields
58 * @param persistenceCapableSuperclass the persistence-capable superclass
59 **/
60 public RegisterClassEvent(JDOImplHelper helper,
61 Class registeredClass,
62 String[] fieldNames,
63 Class[] fieldTypes,
64 byte[] fieldFlags,
65 Class persistenceCapableSuperclass)
66 {
67 super(helper);
68 this.pcClass = registeredClass;
69 this.fieldNames = fieldNames;
70 this.fieldTypes = fieldTypes;
71 this.fieldFlags = fieldFlags;
72 this.persistenceCapableSuperclass = persistenceCapableSuperclass;
73 }
74
75 /**
76 * Returns the class object of the registered persistence-capable class.
77 * @return the persistence-capable class.
78 */
79 public Class getRegisteredClass()
80 {
81 return pcClass;
82 }
83
84 /**
85 * Returns the names of the managed field of the persistence-capable class.
86 * @return the names of the managed fields
87 */
88 public String[] getFieldNames()
89 {
90 return fieldNames;
91 }
92
93 /**
94 * Returns the types of the managed field of the persistence-capable class.
95 * @return the types of the managed fields
96 */
97 public Class[] getFieldTypes()
98 {
99 return fieldTypes;
100 }
101
102 /**
103 * Returns the flags of the managed field of the persistence-capable class.
104 * @return the flags of the managed fields
105 */
106 public byte[] getFieldFlags()
107 {
108 return fieldFlags;
109 }
110
111 /**
112 * Returns the class object of the persistence-capable superclass.
113 * @return the persistence-capable superclass.
114 */
115 public Class getPersistenceCapableSuperclass()
116 {
117 return persistenceCapableSuperclass;
118 }
119
120 }
121
122
123