KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > jdo > spi > RegisterClassEvent


1 /*
2  * Copyright 2005 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 /*
18  * RegisterClassEvent.java
19  *
20  */

21
22 package javax.jdo.spi;
23
24 import java.util.EventObject JavaDoc;
25
26 /**
27  * A <code>RegisterClassEvent</code> event gets delivered whenever a persistence-capable
28  * class registers itself with the <code>JDOImplHelper</code>.
29  *
30  * @version 1.0
31  */

32 public class RegisterClassEvent
33     extends EventObject JavaDoc
34 {
35     /** The class object of the registered persistence-capable class */
36     protected Class JavaDoc pcClass;
37
38     /** The names of managed fields of the persistence-capable class */
39     protected String JavaDoc[] fieldNames;
40
41     /** The types of managed fields of the persistence-capable class */
42     protected Class JavaDoc[] fieldTypes;
43
44     /** The flags of managed fields of the persistence-capable class */
45     protected byte[] fieldFlags;
46
47     /** */
48     protected Class JavaDoc persistenceCapableSuperclass;
49
50     /**
51      * Constructs a new <code>RegisterClassEvent</code>.
52      * @param helper the <code>JDOImplHelper</code> instance
53      * @param registeredClass the persistence-capable class
54      * @param fieldNames the names of the managed fields
55      * @param fieldTypes the types of the managed fields
56      * @param fieldFlags the flags of the managed fields
57      * @param persistenceCapableSuperclass the persistence-capable superclass
58      **/

59     public RegisterClassEvent(JDOImplHelper helper,
60                               Class JavaDoc registeredClass,
61                               String JavaDoc[] fieldNames,
62                               Class JavaDoc[] fieldTypes,
63                               byte[] fieldFlags,
64                               Class JavaDoc persistenceCapableSuperclass)
65     {
66         super(helper);
67         this.pcClass = registeredClass;
68         this.fieldNames = fieldNames;
69         this.fieldTypes = fieldTypes;
70         this.fieldFlags = fieldFlags;
71         this.persistenceCapableSuperclass = persistenceCapableSuperclass;
72     }
73
74     /**
75      * Returns the class object of the registered persistence-capable class.
76      * @return the persistence-capable class.
77      */

78     public Class JavaDoc getRegisteredClass()
79     {
80         return pcClass;
81     }
82     
83     /**
84      * Returns the names of the managed field of the persistence-capable class.
85      * @return the names of the managed fields
86      */

87     public String JavaDoc[] getFieldNames()
88     {
89         return fieldNames;
90     }
91
92     /**
93      * Returns the types of the managed field of the persistence-capable class.
94      * @return the types of the managed fields
95      */

96     public Class JavaDoc[] getFieldTypes()
97     {
98         return fieldTypes;
99     }
100
101     /**
102      * Returns the flags of the managed field of the persistence-capable class.
103      * @return the flags of the managed fields
104      */

105     public byte[] getFieldFlags()
106     {
107         return fieldFlags;
108     }
109
110     /**
111      * Returns the class object of the persistence-capable superclass.
112      * @return the persistence-capable superclass.
113      */

114     public Class JavaDoc getPersistenceCapableSuperclass()
115     {
116         return persistenceCapableSuperclass;
117     }
118     
119 }
120
121
122
123
Popular Tags