KickJava   Java API By Example, From Geeks To Geeks.

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


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: EjbDeploymentDescriptor.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 EjbDeploymentDescriptor.
21  *
22  * @version $Revision: 1104 $ $Date: 2004-03-30 16:44:02 -0800 (Tue, 30 Mar 2004) $
23  */

24 public class EjbDeploymentDescriptor 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 EjbDeploymentDescriptor() {
57         super();
58         nsURI = "http://www.openejb.org/openejb-jar/1.1";
59         xmlName = "ejb-deployment";
60         
61         //-- set grouping compositor
62
setCompositorAsSequence();
63         org.exolab.castor.xml.util.XMLFieldDescriptorImpl desc = null;
64         org.exolab.castor.xml.XMLFieldHandler handler = null;
65         org.exolab.castor.xml.FieldValidator fieldValidator = null;
66         //-- initialize attribute descriptors
67

68         //-- _ejbName
69
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_ejbName", "ejb-name", org.exolab.castor.xml.NodeType.Attribute);
70         desc.setImmutable(true);
71         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
72             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
73                 throws IllegalStateException JavaDoc
74             {
75                 EjbDeployment target = (EjbDeployment) object;
76                 return target.getEjbName();
77             }
78             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
79                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
80             {
81                 try {
82                     EjbDeployment target = (EjbDeployment) object;
83                     target.setEjbName( (java.lang.String JavaDoc) value);
84                 }
85                 catch (java.lang.Exception JavaDoc ex) {
86                     throw new IllegalStateException JavaDoc(ex.toString());
87                 }
88             }
89             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
90                 return null;
91             }
92         } );
93         desc.setHandler(handler);
94         addFieldDescriptor(desc);
95         
96         //-- validation code for: _ejbName
97
fieldValidator = new org.exolab.castor.xml.FieldValidator();
98         { //-- local scope
99
StringValidator typeValidator = new StringValidator();
100             typeValidator.setWhiteSpace("preserve");
101             fieldValidator.setValidator(typeValidator);
102         }
103         desc.setValidator(fieldValidator);
104         //-- _deploymentId
105
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_deploymentId", "deployment-id", org.exolab.castor.xml.NodeType.Attribute);
106         this.identity = desc;
107         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
108             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
109                 throws IllegalStateException JavaDoc
110             {
111                 EjbDeployment target = (EjbDeployment) object;
112                 return target.getDeploymentId();
113             }
114             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
115                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
116             {
117                 try {
118                     EjbDeployment target = (EjbDeployment) object;
119                     target.setDeploymentId( (java.lang.String JavaDoc) value);
120                 }
121                 catch (java.lang.Exception JavaDoc ex) {
122                     throw new IllegalStateException JavaDoc(ex.toString());
123                 }
124             }
125             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
126                 return new java.lang.String JavaDoc();
127             }
128         } );
129         desc.setHandler(handler);
130         addFieldDescriptor(desc);
131         
132         //-- validation code for: _deploymentId
133
fieldValidator = new org.exolab.castor.xml.FieldValidator();
134         { //-- local scope
135
}
136         desc.setValidator(fieldValidator);
137         //-- _containerId
138
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_containerId", "container-id", org.exolab.castor.xml.NodeType.Attribute);
139         desc.setImmutable(true);
140         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
141             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
142                 throws IllegalStateException JavaDoc
143             {
144                 EjbDeployment target = (EjbDeployment) object;
145                 return target.getContainerId();
146             }
147             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
148                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
149             {
150                 try {
151                     EjbDeployment target = (EjbDeployment) object;
152                     target.setContainerId( (java.lang.String JavaDoc) value);
153                 }
154                 catch (java.lang.Exception JavaDoc ex) {
155                     throw new IllegalStateException JavaDoc(ex.toString());
156                 }
157             }
158             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
159                 return null;
160             }
161         } );
162         desc.setHandler(handler);
163         addFieldDescriptor(desc);
164         
165         //-- validation code for: _containerId
166
fieldValidator = new org.exolab.castor.xml.FieldValidator();
167         { //-- local scope
168
StringValidator typeValidator = new StringValidator();
169             typeValidator.setWhiteSpace("preserve");
170             fieldValidator.setValidator(typeValidator);
171         }
172         desc.setValidator(fieldValidator);
173         //-- initialize element descriptors
174

175         //-- _resourceLinkList
176
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.openejb.alt.config.ejb11.ResourceLink.class, "_resourceLinkList", "resource-link", org.exolab.castor.xml.NodeType.Element);
177         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
178             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
179                 throws IllegalStateException JavaDoc
180             {
181                 EjbDeployment target = (EjbDeployment) object;
182                 return target.getResourceLink();
183             }
184             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
185                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
186             {
187                 try {
188                     EjbDeployment target = (EjbDeployment) object;
189                     target.addResourceLink( (org.openejb.alt.config.ejb11.ResourceLink) value);
190                 }
191                 catch (java.lang.Exception JavaDoc ex) {
192                     throw new IllegalStateException JavaDoc(ex.toString());
193                 }
194             }
195             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
196                 return new org.openejb.alt.config.ejb11.ResourceLink();
197             }
198         } );
199         desc.setHandler(handler);
200         desc.setMultivalued(true);
201         addFieldDescriptor(desc);
202         
203         //-- validation code for: _resourceLinkList
204
fieldValidator = new org.exolab.castor.xml.FieldValidator();
205         fieldValidator.setMinOccurs(0);
206         { //-- local scope
207
}
208         desc.setValidator(fieldValidator);
209         //-- _queryList
210
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.openejb.alt.config.ejb11.Query.class, "_queryList", "query", org.exolab.castor.xml.NodeType.Element);
211         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
212             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
213                 throws IllegalStateException JavaDoc
214             {
215                 EjbDeployment target = (EjbDeployment) object;
216                 return target.getQuery();
217             }
218             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
219                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
220             {
221                 try {
222                     EjbDeployment target = (EjbDeployment) object;
223                     target.addQuery( (org.openejb.alt.config.ejb11.Query) value);
224                 }
225                 catch (java.lang.Exception JavaDoc ex) {
226                     throw new IllegalStateException JavaDoc(ex.toString());
227                 }
228             }
229             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
230                 return new org.openejb.alt.config.ejb11.Query();
231             }
232         } );
233         desc.setHandler(handler);
234         desc.setMultivalued(true);
235         addFieldDescriptor(desc);
236         
237         //-- validation code for: _queryList
238
fieldValidator = new org.exolab.castor.xml.FieldValidator();
239         fieldValidator.setMinOccurs(0);
240         { //-- local scope
241
}
242         desc.setValidator(fieldValidator);
243     } //-- org.openejb.alt.config.ejb11.EjbDeploymentDescriptor()
244

245
246       //-----------/
247
//- Methods -/
248
//-----------/
249

250     /**
251      * Method getAccessMode
252      */

253     public org.exolab.castor.mapping.AccessMode getAccessMode()
254     {
255         return null;
256     } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
257

258     /**
259      * Method getExtends
260      */

261     public org.exolab.castor.mapping.ClassDescriptor getExtends()
262     {
263         return null;
264     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
265

266     /**
267      * Method getIdentity
268      */

269     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
270     {
271         return identity;
272     } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
273

274     /**
275      * Method getJavaClass
276      */

277     public java.lang.Class JavaDoc getJavaClass()
278     {
279         return org.openejb.alt.config.ejb11.EjbDeployment.class;
280     } //-- java.lang.Class getJavaClass()
281

282     /**
283      * Method getNameSpacePrefix
284      */

285     public java.lang.String JavaDoc getNameSpacePrefix()
286     {
287         return nsPrefix;
288     } //-- java.lang.String getNameSpacePrefix()
289

290     /**
291      * Method getNameSpaceURI
292      */

293     public java.lang.String JavaDoc getNameSpaceURI()
294     {
295         return nsURI;
296     } //-- java.lang.String getNameSpaceURI()
297

298     /**
299      * Method getValidator
300      */

301     public org.exolab.castor.xml.TypeValidator getValidator()
302     {
303         return this;
304     } //-- org.exolab.castor.xml.TypeValidator getValidator()
305

306     /**
307      * Method getXMLName
308      */

309     public java.lang.String JavaDoc getXMLName()
310     {
311         return xmlName;
312     } //-- java.lang.String getXMLName()
313

314 }
315
Popular Tags