KickJava   Java API By Example, From Geeks To Geeks.

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


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

24 public class EnterpriseBeansItemDescriptor 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 EnterpriseBeansItemDescriptor() {
57         super();
58         nsURI = "http://www.openejb.org/ejb-jar/1.1";
59         xmlName = "enterprise-beans";
60         
61         //-- set grouping compositor
62
setCompositorAsChoice();
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         //-- initialize element descriptors
69

70         //-- _session
71
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.openejb.alt.config.ejb11.Session.class, "_session", "session", org.exolab.castor.xml.NodeType.Element);
72         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
73             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
74                 throws IllegalStateException JavaDoc
75             {
76                 EnterpriseBeansItem target = (EnterpriseBeansItem) object;
77                 return target.getSession();
78             }
79             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
80                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
81             {
82                 try {
83                     EnterpriseBeansItem target = (EnterpriseBeansItem) object;
84                     target.setSession( (org.openejb.alt.config.ejb11.Session) value);
85                 }
86                 catch (java.lang.Exception JavaDoc ex) {
87                     throw new IllegalStateException JavaDoc(ex.toString());
88                 }
89             }
90             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
91                 return new org.openejb.alt.config.ejb11.Session();
92             }
93         } );
94         desc.setHandler(handler);
95         desc.setMultivalued(false);
96         addFieldDescriptor(desc);
97         
98         //-- validation code for: _session
99
fieldValidator = new org.exolab.castor.xml.FieldValidator();
100         { //-- local scope
101
}
102         desc.setValidator(fieldValidator);
103         //-- _entity
104
desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(org.openejb.alt.config.ejb11.Entity.class, "_entity", "entity", org.exolab.castor.xml.NodeType.Element);
105         handler = (new org.exolab.castor.xml.XMLFieldHandler() {
106             public java.lang.Object JavaDoc getValue( java.lang.Object JavaDoc object )
107                 throws IllegalStateException JavaDoc
108             {
109                 EnterpriseBeansItem target = (EnterpriseBeansItem) object;
110                 return target.getEntity();
111             }
112             public void setValue( java.lang.Object JavaDoc object, java.lang.Object JavaDoc value)
113                 throws IllegalStateException JavaDoc, IllegalArgumentException JavaDoc
114             {
115                 try {
116                     EnterpriseBeansItem target = (EnterpriseBeansItem) object;
117                     target.setEntity( (org.openejb.alt.config.ejb11.Entity) value);
118                 }
119                 catch (java.lang.Exception JavaDoc ex) {
120                     throw new IllegalStateException JavaDoc(ex.toString());
121                 }
122             }
123             public java.lang.Object JavaDoc newInstance( java.lang.Object JavaDoc parent ) {
124                 return new org.openejb.alt.config.ejb11.Entity();
125             }
126         } );
127         desc.setHandler(handler);
128         desc.setMultivalued(false);
129         addFieldDescriptor(desc);
130         
131         //-- validation code for: _entity
132
fieldValidator = new org.exolab.castor.xml.FieldValidator();
133         { //-- local scope
134
}
135         desc.setValidator(fieldValidator);
136     } //-- org.openejb.alt.config.ejb11.EnterpriseBeansItemDescriptor()
137

138
139       //-----------/
140
//- Methods -/
141
//-----------/
142

143     /**
144      * Method getAccessMode
145      */

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

151     /**
152      * Method getExtends
153      */

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

159     /**
160      * Method getIdentity
161      */

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

167     /**
168      * Method getJavaClass
169      */

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

175     /**
176      * Method getNameSpacePrefix
177      */

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

183     /**
184      * Method getNameSpaceURI
185      */

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

191     /**
192      * Method getValidator
193      */

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

199     /**
200      * Method getXMLName
201      */

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

207 }
208
Popular Tags