1 /*
2 * This class was automatically generated with
3 * <a href="http://castor.exolab.org">Castor 0.9.4</a>, using an
4 * XML Schema.
5 * $Id$
6 */
7
8 package org.enableit.db.beans;
9
10 //---------------------------------/
11 //- Imported classes and packages -/
12 //---------------------------------/
13
14 import org.exolab.castor.mapping.AccessMode;
15 import org.exolab.castor.mapping.ClassDescriptor;
16 import org.exolab.castor.mapping.FieldDescriptor;
17 import org.exolab.castor.xml.*;
18 import org.exolab.castor.xml.FieldValidator;
19 import org.exolab.castor.xml.TypeValidator;
20 import org.exolab.castor.xml.XMLFieldDescriptor;
21 import org.exolab.castor.xml.handlers.*;
22 import org.exolab.castor.xml.util.XMLFieldDescriptorImpl;
23 import org.exolab.castor.xml.validators.*;
24
25 /***
26 *
27 *
28 * @version $Revision$ $Date$
29 **/
30 public class ColDescriptor extends org.exolab.castor.xml.util.XMLClassDescriptorImpl {
31
32
33 //--------------------------/
34 //- Class/Member Variables -/
35 //--------------------------/
36
37 private java.lang.String nsPrefix;
38
39 private java.lang.String nsURI;
40
41 private java.lang.String xmlName;
42
43 private org.exolab.castor.xml.XMLFieldDescriptor identity;
44
45
46 //----------------/
47 //- Constructors -/
48 //----------------/
49
50 public ColDescriptor() {
51 super();
52 xmlName = "col";
53 XMLFieldDescriptorImpl desc = null;
54 XMLFieldHandler handler = null;
55 FieldValidator fieldValidator = null;
56 //-- initialize attribute descriptors
57
58 //-- _name
59 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_name", "name", NodeType.Attribute);
60 desc.setImmutable(true);
61 handler = (new XMLFieldHandler() {
62 public java.lang.Object getValue( java.lang.Object object )
63 throws IllegalStateException
64 {
65 Col target = (Col) object;
66 return target.getName();
67 }
68 public void setValue( java.lang.Object object, java.lang.Object value)
69 throws IllegalStateException, IllegalArgumentException
70 {
71 try {
72 Col target = (Col) object;
73 target.setName( (java.lang.String) value);
74 }
75 catch (Exception ex) {
76 throw new IllegalStateException(ex.toString());
77 }
78 }
79 public java.lang.Object newInstance( java.lang.Object parent ) {
80 return null;
81 }
82 } );
83 desc.setHandler(handler);
84 desc.setRequired(true);
85 addFieldDescriptor(desc);
86
87 //-- validation code for: _name
88 fieldValidator = new FieldValidator();
89 fieldValidator.setMinOccurs(1);
90 { //-- local scope
91 StringValidator typeValidator = new StringValidator();
92 typeValidator.setWhiteSpace("preserve");
93 fieldValidator.setValidator(typeValidator);
94 }
95 desc.setValidator(fieldValidator);
96 //-- _type
97 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_type", "type", NodeType.Attribute);
98 desc.setImmutable(true);
99 handler = (new XMLFieldHandler() {
100 public java.lang.Object getValue( java.lang.Object object )
101 throws IllegalStateException
102 {
103 Col target = (Col) object;
104 return target.getType();
105 }
106 public void setValue( java.lang.Object object, java.lang.Object value)
107 throws IllegalStateException, IllegalArgumentException
108 {
109 try {
110 Col target = (Col) object;
111 target.setType( (java.lang.String) value);
112 }
113 catch (Exception ex) {
114 throw new IllegalStateException(ex.toString());
115 }
116 }
117 public java.lang.Object newInstance( java.lang.Object parent ) {
118 return null;
119 }
120 } );
121 desc.setHandler(handler);
122 desc.setRequired(true);
123 addFieldDescriptor(desc);
124
125 //-- validation code for: _type
126 fieldValidator = new FieldValidator();
127 fieldValidator.setMinOccurs(1);
128 { //-- local scope
129 StringValidator typeValidator = new StringValidator();
130 typeValidator.setWhiteSpace("preserve");
131 fieldValidator.setValidator(typeValidator);
132 }
133 desc.setValidator(fieldValidator);
134 //-- _value
135 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_value", "value", NodeType.Attribute);
136 desc.setImmutable(true);
137 handler = (new XMLFieldHandler() {
138 public java.lang.Object getValue( java.lang.Object object )
139 throws IllegalStateException
140 {
141 Col target = (Col) object;
142 return target.getValue();
143 }
144 public void setValue( java.lang.Object object, java.lang.Object value)
145 throws IllegalStateException, IllegalArgumentException
146 {
147 try {
148 Col target = (Col) object;
149 target.setValue( (java.lang.String) value);
150 }
151 catch (Exception ex) {
152 throw new IllegalStateException(ex.toString());
153 }
154 }
155 public java.lang.Object newInstance( java.lang.Object parent ) {
156 return null;
157 }
158 } );
159 desc.setHandler(handler);
160 desc.setRequired(true);
161 addFieldDescriptor(desc);
162
163 //-- validation code for: _value
164 fieldValidator = new FieldValidator();
165 fieldValidator.setMinOccurs(1);
166 { //-- local scope
167 StringValidator typeValidator = new StringValidator();
168 typeValidator.setWhiteSpace("preserve");
169 fieldValidator.setValidator(typeValidator);
170 }
171 desc.setValidator(fieldValidator);
172 //-- initialize element descriptors
173
174 } //-- org.enableit.db.beans.ColDescriptor()
175
176
177 //-----------/
178 //- Methods -/
179 //-----------/
180
181 /***
182 **/
183 public org.exolab.castor.mapping.AccessMode getAccessMode()
184 {
185 return null;
186 } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
187
188 /***
189 **/
190 public org.exolab.castor.mapping.ClassDescriptor getExtends()
191 {
192 return null;
193 } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
194
195 /***
196 **/
197 public org.exolab.castor.mapping.FieldDescriptor getIdentity()
198 {
199 return identity;
200 } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
201
202 /***
203 **/
204 public java.lang.Class getJavaClass()
205 {
206 return org.enableit.db.beans.Col.class;
207 } //-- java.lang.Class getJavaClass()
208
209 /***
210 **/
211 public java.lang.String getNameSpacePrefix()
212 {
213 return nsPrefix;
214 } //-- java.lang.String getNameSpacePrefix()
215
216 /***
217 **/
218 public java.lang.String getNameSpaceURI()
219 {
220 return nsURI;
221 } //-- java.lang.String getNameSpaceURI()
222
223 /***
224 **/
225 public org.exolab.castor.xml.TypeValidator getValidator()
226 {
227 return this;
228 } //-- org.exolab.castor.xml.TypeValidator getValidator()
229
230 /***
231 **/
232 public java.lang.String getXMLName()
233 {
234 return xmlName;
235 } //-- java.lang.String getXMLName()
236
237 }
This page was automatically generated by Maven