KickJava   Java API By Example, From Geeks To Geeks.

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


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

24 public class EnvEntryDescriptor 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 EnvEntryDescriptor() {
57         super();
58         nsURI = "http://www.openejb.org/ejb-jar/1.1";
59         xmlName = "env-entry";
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         //-- _id
69
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_id", "id", org.exolab.castor.xml.NodeType.Attribute);
70         this.identity = desc;
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                 EnvEntry target = (EnvEntry) object;
76                 return target.getId();
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                     EnvEntry target = (EnvEntry) object;
83                     target.setId( (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 new java.lang.String JavaDoc();
91             }
92         } );
93         desc.setHandler(handler);
94         addFieldDescriptor(desc);
95         
96         //-- validation code for: _id
97
fieldValidator = new org.exolab.castor.xml.FieldValidator();
98         { //-- local scope
99
}
100         desc.setValidator(fieldValidator);
101         //-- initialize element descriptors
102

103         //-- _description
104
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_description", "description", org.exolab.castor.xml.NodeType.Element);
105         desc.setImmutable(true);
106         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
107             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
108                 throws IllegalStateException JavaDoc
109             {
110                 EnvEntry target = (EnvEntry) object;
111                 return target.getDescription();
112             }
113             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
114                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
115             {
116                 try {
117                     EnvEntry target = (EnvEntry) object;
118                     target.setDescription( (java.lang.String JavaDoc) value);
119                 }
120                 catch (java.lang.Exception JavaDoc ex) {
121                     throw new IllegalStateException JavaDoc(ex.toString());
122                 }
123             }
124             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
125                 return null;
126             }
127         } );
128         desc.setHandler(handler);
129         desc.setMultivalued(false);
130         addFieldDescriptor(desc);
131         
132         //-- validation code for: _description
133
fieldValidator = new org.exolab.castor.xml.FieldValidator();
134         { //-- local scope
135
StringValidator typeValidator = new StringValidator();
136             typeValidator.setWhiteSpace("preserve");
137             fieldValidator.setValidator(typeValidator);
138         }
139         desc.setValidator(fieldValidator);
140         //-- _envEntryName
141
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_envEntryName", "env-entry-name", org.exolab.castor.xml.NodeType.Element);
142         desc.setImmutable(true);
143         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
144             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
145                 throws IllegalStateException JavaDoc
146             {
147                 EnvEntry target = (EnvEntry) object;
148                 return target.getEnvEntryName();
149             }
150             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
151                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
152             {
153                 try {
154                     EnvEntry target = (EnvEntry) object;
155                     target.setEnvEntryName( (java.lang.String JavaDoc) value);
156                 }
157                 catch (java.lang.Exception JavaDoc ex) {
158                     throw new IllegalStateException JavaDoc(ex.toString());
159                 }
160             }
161             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
162                 return null;
163             }
164         } );
165         desc.setHandler(handler);
166         desc.setRequired(true);
167         desc.setMultivalued(false);
168         addFieldDescriptor(desc);
169         
170         //-- validation code for: _envEntryName
171
fieldValidator = new org.exolab.castor.xml.FieldValidator();
172         fieldValidator.setMinOccurs(1);
173         { //-- local scope
174
StringValidator typeValidator = new StringValidator();
175             typeValidator.setWhiteSpace("preserve");
176             fieldValidator.setValidator(typeValidator);
177         }
178         desc.setValidator(fieldValidator);
179         //-- _envEntryType
180
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_envEntryType", "env-entry-type", org.exolab.castor.xml.NodeType.Element);
181         desc.setImmutable(true);
182         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
183             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
184                 throws IllegalStateException JavaDoc
185             {
186                 EnvEntry target = (EnvEntry) object;
187                 return target.getEnvEntryType();
188             }
189             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
190                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
191             {
192                 try {
193                     EnvEntry target = (EnvEntry) object;
194                     target.setEnvEntryType( (java.lang.String JavaDoc) value);
195                 }
196                 catch (java.lang.Exception JavaDoc ex) {
197                     throw new IllegalStateException JavaDoc(ex.toString());
198                 }
199             }
200             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
201                 return null;
202             }
203         } );
204         desc.setHandler(handler);
205         desc.setRequired(true);
206         desc.setMultivalued(false);
207         addFieldDescriptor(desc);
208         
209         //-- validation code for: _envEntryType
210
fieldValidator = new org.exolab.castor.xml.FieldValidator();
211         fieldValidator.setMinOccurs(1);
212         { //-- local scope
213
StringValidator typeValidator = new StringValidator();
214             typeValidator.setWhiteSpace("preserve");
215             typeValidator.setPattern("[a-zA-Z0-9_$.]+");
216             fieldValidator.setValidator(typeValidator);
217         }
218         desc.setValidator(fieldValidator);
219         //-- _envEntryValue
220
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.String JavaDoc.class, "_envEntryValue", "env-entry-value", org.exolab.castor.xml.NodeType.Element);
221         desc.setImmutable(true);
222         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
223             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
224                 throws IllegalStateException JavaDoc
225             {
226                 EnvEntry target = (EnvEntry) object;
227                 return target.getEnvEntryValue();
228             }
229             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
230                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
231             {
232                 try {
233                     EnvEntry target = (EnvEntry) object;
234                     target.setEnvEntryValue( (java.lang.String JavaDoc) value);
235                 }
236                 catch (java.lang.Exception JavaDoc ex) {
237                     throw new IllegalStateException JavaDoc(ex.toString());
238                 }
239             }
240             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
241                 return null;
242             }
243         } );
244         desc.setHandler(handler);
245         desc.setMultivalued(false);
246         addFieldDescriptor(desc);
247         
248         //-- validation code for: _envEntryValue
249
fieldValidator = new org.exolab.castor.xml.FieldValidator();
250         { //-- local scope
251
StringValidator typeValidator = new StringValidator();
252             typeValidator.setWhiteSpace("preserve");
253             fieldValidator.setValidator(typeValidator);
254         }
255         desc.setValidator(fieldValidator);
256     } //-- org.openejb.alt.config.ejb11.EnvEntryDescriptor()
257

258
259       //-----------/
260
//- Methods -/
261
//-----------/
262

263     /**
264      * Method getAccessMode
265      */

266     public org.exolab.castor.mapping.AccessMode getAccessMode()
267     {
268         return null;
269     } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
270

271     /**
272      * Method getExtends
273      */

274     public org.exolab.castor.mapping.ClassDescriptor getExtends()
275     {
276         return null;
277     } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
278

279     /**
280      * Method getIdentity
281      */

282     public org.exolab.castor.mapping.FieldDescriptor getIdentity()
283     {
284         return identity;
285     } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
286

287     /**
288      * Method getJavaClass
289      */

290     public java.lang.Class JavaDoc getJavaClass()
291     {
292         return org.openejb.alt.config.ejb11.EnvEntry.class;
293     } //-- java.lang.Class getJavaClass()
294

295     /**
296      * Method getNameSpacePrefix
297      */

298     public java.lang.String JavaDoc getNameSpacePrefix()
299     {
300         return nsPrefix;
301     } //-- java.lang.String getNameSpacePrefix()
302

303     /**
304      * Method getNameSpaceURI
305      */

306     public java.lang.String JavaDoc getNameSpaceURI()
307     {
308         return nsURI;
309     } //-- java.lang.String getNameSpaceURI()
310

311     /**
312      * Method getValidator
313      */

314     public org.exolab.castor.xml.TypeValidator getValidator()
315     {
316         return this;
317     } //-- org.exolab.castor.xml.TypeValidator getValidator()
318

319     /**
320      * Method getXMLName
321      */

322     public java.lang.String JavaDoc getXMLName()
323     {
324         return xmlName;
325     } //-- java.lang.String getXMLName()
326

327 }
328
Popular Tags