KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openejb > alt > config > ejb11 > EnterpriseBeansDescriptor


1 /*
2  * This class was automatically generated with
3  * <a HREF="http://www.castor.org">Castor 0.9.5.3</a>, using an XML
4  * Schema.
5  * $Id: EnterpriseBeansDescriptor.java 1104 2004-03-31 00:44:02Z dblevins $
6  */

7
8 package org.openejb.alt.config.ejb11;
9
10   //---------------------------------/
11
//- Imported classes and packages -/
12
//---------------------------------/
13

14 import org.exolab.castor.mapping.AccessMode;
15 import org.exolab.castor.xml.TypeValidator;
16 import org.exolab.castor.xml.XMLFieldDescriptor;
17 import org.exolab.castor.xml.validators.*;
18
19 /**
20  * Class EnterpriseBeansDescriptor.
21  *
22  * @version $Revision: 1104 $ $Date: 2004-03-30 16:44:02 -0800 (Tue, 30 Mar 2004) $
23  */

24 public class EnterpriseBeansDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
25
26
27       //--------------------------/
28
//- Class/Member Variables -/
29
//--------------------------/
30

31     /**
32      * Field nsPrefix
33      */

34     private java.lang.String JavaDoc nsPrefix;
35
36     /**
37      * Field nsURI
38      */

39     private java.lang.String JavaDoc nsURI;
40
41     /**
42      * Field xmlName
43      */

44     private java.lang.String JavaDoc xmlName;
45
46     /**
47      * Field identity
48      */

49     private org.exolab.castor.xml.XMLFieldDescriptor identity;
50
51
52       //----------------/
53
//- Constructors -/
54
//----------------/
55

56     public EnterpriseBeansDescriptor() {
57         super();
58         xmlName = "enterprise-beans";
59         org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
60         org.exolab.castor.xml.XMLFieldHandler handler = null;
61         org.exolab.castor.xml.FieldValidator fieldValidator = null;
62         //-- initialize attribute descriptors
63

64         //-- _id
65
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);
66         this.identity = desc;
67         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
68             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
69                 throws IllegalStateException JavaDoc
70             {
71                 EnterpriseBeans target = (EnterpriseBeans) object;
72                 return target.getId();
73             }
74             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
75                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
76             {
77                 try {
78                     EnterpriseBeans target = (EnterpriseBeans) object;
79                     target.setId( (java.lang.String JavaDoc) value);
80                 }
81                 catch (java.lang.Exception JavaDoc ex) {
82                     throw new IllegalStateException JavaDoc(ex.toString());
83                 }
84             }
85             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
86                 return new java.lang.String JavaDoc();
87             }
88         } );
89         desc.setHandler(handler);
90         addFieldDescriptor(desc);
91         
92         //-- validation code for: _id
93
fieldValidator = new org.exolab.castor.xml.FieldValidator();
94         { //-- local scope
95
}
96         desc.setValidator(fieldValidator);
97         //-- initialize element descriptors
98

99         //-- _items
100
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.openejb.alt.config.ejb11.EnterpriseBeansItem.class, "_items", (String JavaDoc)null, org.exolab.castor.xml.NodeType.Element);
101         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
102             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
103                 throws IllegalStateException JavaDoc
104             {
105                 EnterpriseBeans target = (EnterpriseBeans) object;
106                 return target.getEnterpriseBeansItem();
107             }
108             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
109                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
110             {
111                 try {
112                     EnterpriseBeans target = (EnterpriseBeans) object;
113                     target.addEnterpriseBeansItem( (org.openejb.alt.config.ejb11.EnterpriseBeansItem) value);
114                 }
115                 catch (java.lang.Exception JavaDoc ex) {
116                     throw new IllegalStateException JavaDoc(ex.toString());
117                 }
118             }
119             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
120                 return new org.openejb.alt.config.ejb11.EnterpriseBeansItem();
121             }
122         } );
123         desc.setHandler(handler);
124         desc.setContainer(true);
125         desc.setClassDescriptor(new org.openejb.alt.config.ejb11.EnterpriseBeansItemDescriptor());
126         desc.setMultivalued(true);
127         addFieldDescriptor(desc);
128         
129         //-- validation code for: _items
130
fieldValidator = new org.exolab.castor.xml.FieldValidator();
131         fieldValidator.setMinOccurs(0);
132         { //-- local scope
133
}
134         desc.setValidator(fieldValidator);
135     } //-- org.openejb.alt.config.ejb11.EnterpriseBeansDescriptor()
136

137
138       //-----------/
139
//- Methods -/
140
//-----------/
141

142     /**
143      * Method getAccessMode
144      */

145     public org.exolab.castor.mapping.AccessMode getAccessMode()
146     {
147         return null;
148     } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
149

150     /**
151      * Method getExtends
152      */

153     public org.exolab.castor.mapping.ClassDescriptor getExtends()
154     {
155         return null;
156     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
157

158     /**
159      * Method getIdentity
160      */

161     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
162     {
163         return identity;
164     } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
165

166     /**
167      * Method getJavaClass
168      */

169     public java.lang.Class JavaDoc getJavaClass()
170     {
171         return org.openejb.alt.config.ejb11.EnterpriseBeans.class;
172     } //-- java.lang.Class getJavaClass()
173

174     /**
175      * Method getNameSpacePrefix
176      */

177     public java.lang.String JavaDoc getNameSpacePrefix()
178     {
179         return nsPrefix;
180     } //-- java.lang.String getNameSpacePrefix()
181

182     /**
183      * Method getNameSpaceURI
184      */

185     public java.lang.String JavaDoc getNameSpaceURI()
186     {
187         return nsURI;
188     } //-- java.lang.String getNameSpaceURI()
189

190     /**
191      * Method getValidator
192      */

193     public org.exolab.castor.xml.TypeValidator getValidator()
194     {
195         return this;
196     } //-- org.exolab.castor.xml.TypeValidator getValidator()
197

198     /**
199      * Method getXMLName
200      */

201     public java.lang.String JavaDoc getXMLName()
202     {
203         return xmlName;
204     } //-- java.lang.String getXMLName()
205

206 }
207
Popular Tags