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 ColumnDescriptor 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 ColumnDescriptor() {
51 super();
52 nsURI = "http://darrt.sourceforge.net/schemas/darrt";
53 xmlName = "column";
54
55 //-- set grouping compositor
56 setCompositorAsSequence();
57 XMLFieldDescriptorImpl desc = null;
58 XMLFieldHandler handler = null;
59 FieldValidator fieldValidator = null;
60 //-- initialize attribute descriptors
61
62 //-- initialize element descriptors
63
64 //-- _description
65 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_description", "description", NodeType.Element);
66 desc.setImmutable(true);
67 handler = (new XMLFieldHandler() {
68 public java.lang.Object getValue( java.lang.Object object )
69 throws IllegalStateException
70 {
71 Column target = (Column) object;
72 return target.getDescription();
73 }
74 public void setValue( java.lang.Object object, java.lang.Object value)
75 throws IllegalStateException, IllegalArgumentException
76 {
77 try {
78 Column target = (Column) object;
79 target.setDescription( (java.lang.String) value);
80 }
81 catch (Exception ex) {
82 throw new IllegalStateException(ex.toString());
83 }
84 }
85 public java.lang.Object newInstance( java.lang.Object parent ) {
86 return null;
87 }
88 } );
89 desc.setHandler(handler);
90 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt");
91 desc.setRequired(true);
92 desc.setMultivalued(false);
93 addFieldDescriptor(desc);
94
95 //-- validation code for: _description
96 fieldValidator = new FieldValidator();
97 fieldValidator.setMinOccurs(1);
98 { //-- local scope
99 StringValidator typeValidator = new StringValidator();
100 typeValidator.setWhiteSpace("preserve");
101 fieldValidator.setValidator(typeValidator);
102 }
103 desc.setValidator(fieldValidator);
104 //-- _tableName
105 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_tableName", "table-name", NodeType.Element);
106 desc.setImmutable(true);
107 handler = (new XMLFieldHandler() {
108 public java.lang.Object getValue( java.lang.Object object )
109 throws IllegalStateException
110 {
111 Column target = (Column) object;
112 return target.getTableName();
113 }
114 public void setValue( java.lang.Object object, java.lang.Object value)
115 throws IllegalStateException, IllegalArgumentException
116 {
117 try {
118 Column target = (Column) object;
119 target.setTableName( (java.lang.String) value);
120 }
121 catch (Exception ex) {
122 throw new IllegalStateException(ex.toString());
123 }
124 }
125 public java.lang.Object newInstance( java.lang.Object parent ) {
126 return null;
127 }
128 } );
129 desc.setHandler(handler);
130 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt");
131 desc.setMultivalued(false);
132 addFieldDescriptor(desc);
133
134 //-- validation code for: _tableName
135 fieldValidator = new FieldValidator();
136 { //-- local scope
137 StringValidator typeValidator = new StringValidator();
138 typeValidator.setWhiteSpace("preserve");
139 fieldValidator.setValidator(typeValidator);
140 }
141 desc.setValidator(fieldValidator);
142 //-- _colName
143 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_colName", "col-name", NodeType.Element);
144 desc.setImmutable(true);
145 handler = (new XMLFieldHandler() {
146 public java.lang.Object getValue( java.lang.Object object )
147 throws IllegalStateException
148 {
149 Column target = (Column) object;
150 return target.getColName();
151 }
152 public void setValue( java.lang.Object object, java.lang.Object value)
153 throws IllegalStateException, IllegalArgumentException
154 {
155 try {
156 Column target = (Column) object;
157 target.setColName( (java.lang.String) value);
158 }
159 catch (Exception ex) {
160 throw new IllegalStateException(ex.toString());
161 }
162 }
163 public java.lang.Object newInstance( java.lang.Object parent ) {
164 return null;
165 }
166 } );
167 desc.setHandler(handler);
168 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt");
169 desc.setRequired(true);
170 desc.setMultivalued(false);
171 addFieldDescriptor(desc);
172
173 //-- validation code for: _colName
174 fieldValidator = new FieldValidator();
175 fieldValidator.setMinOccurs(1);
176 { //-- local scope
177 StringValidator typeValidator = new StringValidator();
178 typeValidator.setWhiteSpace("preserve");
179 fieldValidator.setValidator(typeValidator);
180 }
181 desc.setValidator(fieldValidator);
182 //-- _colType
183 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_colType", "col-type", NodeType.Element);
184 desc.setImmutable(true);
185 handler = (new XMLFieldHandler() {
186 public java.lang.Object getValue( java.lang.Object object )
187 throws IllegalStateException
188 {
189 Column target = (Column) object;
190 return target.getColType();
191 }
192 public void setValue( java.lang.Object object, java.lang.Object value)
193 throws IllegalStateException, IllegalArgumentException
194 {
195 try {
196 Column target = (Column) object;
197 target.setColType( (java.lang.String) value);
198 }
199 catch (Exception ex) {
200 throw new IllegalStateException(ex.toString());
201 }
202 }
203 public java.lang.Object newInstance( java.lang.Object parent ) {
204 return null;
205 }
206 } );
207 desc.setHandler(handler);
208 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt");
209 desc.setRequired(true);
210 desc.setMultivalued(false);
211 addFieldDescriptor(desc);
212
213 //-- validation code for: _colType
214 fieldValidator = new FieldValidator();
215 fieldValidator.setMinOccurs(1);
216 { //-- local scope
217 StringValidator typeValidator = new StringValidator();
218 typeValidator.setWhiteSpace("preserve");
219 fieldValidator.setValidator(typeValidator);
220 }
221 desc.setValidator(fieldValidator);
222 //-- _null
223 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_null", "null", NodeType.Element);
224 desc.setImmutable(true);
225 handler = (new XMLFieldHandler() {
226 public java.lang.Object getValue( java.lang.Object object )
227 throws IllegalStateException
228 {
229 Column target = (Column) object;
230 return target.getNull();
231 }
232 public void setValue( java.lang.Object object, java.lang.Object value)
233 throws IllegalStateException, IllegalArgumentException
234 {
235 try {
236 Column target = (Column) object;
237 target.setNull( (java.lang.String) value);
238 }
239 catch (Exception ex) {
240 throw new IllegalStateException(ex.toString());
241 }
242 }
243 public java.lang.Object newInstance( java.lang.Object parent ) {
244 return null;
245 }
246 } );
247 desc.setHandler(handler);
248 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt");
249 desc.setRequired(true);
250 desc.setMultivalued(false);
251 addFieldDescriptor(desc);
252
253 //-- validation code for: _null
254 fieldValidator = new FieldValidator();
255 fieldValidator.setMinOccurs(1);
256 { //-- local scope
257 StringValidator typeValidator = new StringValidator();
258 typeValidator.setWhiteSpace("preserve");
259 fieldValidator.setValidator(typeValidator);
260 }
261 desc.setValidator(fieldValidator);
262 //-- _primaryKey
263 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_primaryKey", "primary-key", NodeType.Element);
264 desc.setImmutable(true);
265 handler = (new XMLFieldHandler() {
266 public java.lang.Object getValue( java.lang.Object object )
267 throws IllegalStateException
268 {
269 Column target = (Column) object;
270 return target.getPrimaryKey();
271 }
272 public void setValue( java.lang.Object object, java.lang.Object value)
273 throws IllegalStateException, IllegalArgumentException
274 {
275 try {
276 Column target = (Column) object;
277 target.setPrimaryKey( (java.lang.String) value);
278 }
279 catch (Exception ex) {
280 throw new IllegalStateException(ex.toString());
281 }
282 }
283 public java.lang.Object newInstance( java.lang.Object parent ) {
284 return null;
285 }
286 } );
287 desc.setHandler(handler);
288 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt");
289 desc.setMultivalued(false);
290 addFieldDescriptor(desc);
291
292 //-- validation code for: _primaryKey
293 fieldValidator = new FieldValidator();
294 { //-- local scope
295 StringValidator typeValidator = new StringValidator();
296 typeValidator.setWhiteSpace("preserve");
297 fieldValidator.setValidator(typeValidator);
298 }
299 desc.setValidator(fieldValidator);
300 //-- _foreignKey
301 desc = new XMLFieldDescriptorImpl(ForeignKey.class, "_foreignKey", "foreign-key", NodeType.Element);
302 handler = (new XMLFieldHandler() {
303 public java.lang.Object getValue( java.lang.Object object )
304 throws IllegalStateException
305 {
306 Column target = (Column) object;
307 return target.getForeignKey();
308 }
309 public void setValue( java.lang.Object object, java.lang.Object value)
310 throws IllegalStateException, IllegalArgumentException
311 {
312 try {
313 Column target = (Column) object;
314 target.setForeignKey( (ForeignKey) value);
315 }
316 catch (Exception ex) {
317 throw new IllegalStateException(ex.toString());
318 }
319 }
320 public java.lang.Object newInstance( java.lang.Object parent ) {
321 return new ForeignKey();
322 }
323 } );
324 desc.setHandler(handler);
325 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt");
326 desc.setMultivalued(false);
327 addFieldDescriptor(desc);
328
329 //-- validation code for: _foreignKey
330 fieldValidator = new FieldValidator();
331 { //-- local scope
332 }
333 desc.setValidator(fieldValidator);
334 //-- _default
335 desc = new XMLFieldDescriptorImpl(java.lang.String.class, "_default", "default", NodeType.Element);
336 desc.setImmutable(true);
337 handler = (new XMLFieldHandler() {
338 public java.lang.Object getValue( java.lang.Object object )
339 throws IllegalStateException
340 {
341 Column target = (Column) object;
342 return target.getDefault();
343 }
344 public void setValue( java.lang.Object object, java.lang.Object value)
345 throws IllegalStateException, IllegalArgumentException
346 {
347 try {
348 Column target = (Column) object;
349 target.setDefault( (java.lang.String) value);
350 }
351 catch (Exception ex) {
352 throw new IllegalStateException(ex.toString());
353 }
354 }
355 public java.lang.Object newInstance( java.lang.Object parent ) {
356 return null;
357 }
358 } );
359 desc.setHandler(handler);
360 desc.setNameSpaceURI("http://darrt.sourceforge.net/schemas/darrt");
361 desc.setMultivalued(false);
362 addFieldDescriptor(desc);
363
364 //-- validation code for: _default
365 fieldValidator = new FieldValidator();
366 { //-- local scope
367 StringValidator typeValidator = new StringValidator();
368 typeValidator.setWhiteSpace("preserve");
369 fieldValidator.setValidator(typeValidator);
370 }
371 desc.setValidator(fieldValidator);
372 } //-- org.enableit.db.beans.ColumnDescriptor()
373
374
375 //-----------/
376 //- Methods -/
377 //-----------/
378
379 /***
380 **/
381 public org.exolab.castor.mapping.AccessMode getAccessMode()
382 {
383 return null;
384 } //-- org.exolab.castor.mapping.AccessMode getAccessMode()
385
386 /***
387 **/
388 public org.exolab.castor.mapping.ClassDescriptor getExtends()
389 {
390 return null;
391 } //-- org.exolab.castor.mapping.ClassDescriptor getExtends()
392
393 /***
394 **/
395 public org.exolab.castor.mapping.FieldDescriptor getIdentity()
396 {
397 return identity;
398 } //-- org.exolab.castor.mapping.FieldDescriptor getIdentity()
399
400 /***
401 **/
402 public java.lang.Class getJavaClass()
403 {
404 return org.enableit.db.beans.Column.class;
405 } //-- java.lang.Class getJavaClass()
406
407 /***
408 **/
409 public java.lang.String getNameSpacePrefix()
410 {
411 return nsPrefix;
412 } //-- java.lang.String getNameSpacePrefix()
413
414 /***
415 **/
416 public java.lang.String getNameSpaceURI()
417 {
418 return nsURI;
419 } //-- java.lang.String getNameSpaceURI()
420
421 /***
422 **/
423 public org.exolab.castor.xml.TypeValidator getValidator()
424 {
425 return this;
426 } //-- org.exolab.castor.xml.TypeValidator getValidator()
427
428 /***
429 **/
430 public java.lang.String getXMLName()
431 {
432 return xmlName;
433 } //-- java.lang.String getXMLName()
434
435 }
This page was automatically generated by Maven