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 java.io.IOException;
15 import java.io.Reader;
16 import java.io.Serializable;
17 import java.io.Writer;
18 import java.util.Enumeration;
19 import java.util.Vector;
20 import org.exolab.castor.xml.*;
21 import org.exolab.castor.xml.MarshalException;
22 import org.exolab.castor.xml.ValidationException;
23 import org.xml.sax.ContentHandler;
24
25 /***
26 *
27 *
28 * @version $Revision$ $Date$
29 **/
30 public class DarrtDbms implements java.io.Serializable {
31
32
33 //--------------------------/
34 //- Class/Member Variables -/
35 //--------------------------/
36
37 private java.lang.String _maxTableNameLength;
38
39 private java.lang.String _name;
40
41 private java.lang.String _notNull;
42
43 private java.lang.String _null;
44
45 private java.lang.String _modifyColumn;
46
47 private boolean _parenthesesWrappedDdlColumns;
48
49 /***
50 * keeps track of state for field: _parenthesesWrappedDdlColumns
51 **/
52 private boolean _has_parenthesesWrappedDdlColumns;
53
54 private java.lang.String _primaryKey;
55
56 private java.lang.String _autoincrement;
57
58 private java.lang.String _default;
59
60 private java.util.Vector _functionList;
61
62 private java.util.Vector _jdbcMappingList;
63
64
65 //----------------/
66 //- Constructors -/
67 //----------------/
68
69 public DarrtDbms() {
70 super();
71 _functionList = new Vector();
72 _jdbcMappingList = new Vector();
73 } //-- org.enableit.db.beans.DarrtDbms()
74
75
76 //-----------/
77 //- Methods -/
78 //-----------/
79
80 /***
81 *
82 *
83 * @param vFunction
84 **/
85 public void addFunction(Function vFunction)
86 throws java.lang.IndexOutOfBoundsException
87 {
88 _functionList.addElement(vFunction);
89 } //-- void addFunction(Function)
90
91 /***
92 *
93 *
94 * @param index
95 * @param vFunction
96 **/
97 public void addFunction(int index, Function vFunction)
98 throws java.lang.IndexOutOfBoundsException
99 {
100 _functionList.insertElementAt(vFunction, index);
101 } //-- void addFunction(int, Function)
102
103 /***
104 *
105 *
106 * @param vJdbcMapping
107 **/
108 public void addJdbcMapping(JdbcMapping vJdbcMapping)
109 throws java.lang.IndexOutOfBoundsException
110 {
111 _jdbcMappingList.addElement(vJdbcMapping);
112 } //-- void addJdbcMapping(JdbcMapping)
113
114 /***
115 *
116 *
117 * @param index
118 * @param vJdbcMapping
119 **/
120 public void addJdbcMapping(int index, JdbcMapping vJdbcMapping)
121 throws java.lang.IndexOutOfBoundsException
122 {
123 _jdbcMappingList.insertElementAt(vJdbcMapping, index);
124 } //-- void addJdbcMapping(int, JdbcMapping)
125
126 /***
127 **/
128 public java.util.Enumeration enumerateFunction()
129 {
130 return _functionList.elements();
131 } //-- java.util.Enumeration enumerateFunction()
132
133 /***
134 **/
135 public java.util.Enumeration enumerateJdbcMapping()
136 {
137 return _jdbcMappingList.elements();
138 } //-- java.util.Enumeration enumerateJdbcMapping()
139
140 /***
141 * Returns the value of field 'autoincrement'.
142 *
143 * @return the value of field 'autoincrement'.
144 **/
145 public java.lang.String getAutoincrement()
146 {
147 return this._autoincrement;
148 } //-- java.lang.String getAutoincrement()
149
150 /***
151 * Returns the value of field 'default'.
152 *
153 * @return the value of field 'default'.
154 **/
155 public java.lang.String getDefault()
156 {
157 return this._default;
158 } //-- java.lang.String getDefault()
159
160 /***
161 *
162 *
163 * @param index
164 **/
165 public Function getFunction(int index)
166 throws java.lang.IndexOutOfBoundsException
167 {
168 //-- check bounds for index
169 if ((index < 0) || (index > _functionList.size())) {
170 throw new IndexOutOfBoundsException();
171 }
172
173 return (Function) _functionList.elementAt(index);
174 } //-- Function getFunction(int)
175
176 /***
177 **/
178 public Function[] getFunction()
179 {
180 int size = _functionList.size();
181 Function[] mArray = new Function[size];
182 for (int index = 0; index < size; index++) {
183 mArray[index] = (Function) _functionList.elementAt(index);
184 }
185 return mArray;
186 } //-- Function[] getFunction()
187
188 /***
189 **/
190 public int getFunctionCount()
191 {
192 return _functionList.size();
193 } //-- int getFunctionCount()
194
195 /***
196 *
197 *
198 * @param index
199 **/
200 public JdbcMapping getJdbcMapping(int index)
201 throws java.lang.IndexOutOfBoundsException
202 {
203 //-- check bounds for index
204 if ((index < 0) || (index > _jdbcMappingList.size())) {
205 throw new IndexOutOfBoundsException();
206 }
207
208 return (JdbcMapping) _jdbcMappingList.elementAt(index);
209 } //-- JdbcMapping getJdbcMapping(int)
210
211 /***
212 **/
213 public JdbcMapping[] getJdbcMapping()
214 {
215 int size = _jdbcMappingList.size();
216 JdbcMapping[] mArray = new JdbcMapping[size];
217 for (int index = 0; index < size; index++) {
218 mArray[index] = (JdbcMapping) _jdbcMappingList.elementAt(index);
219 }
220 return mArray;
221 } //-- JdbcMapping[] getJdbcMapping()
222
223 /***
224 **/
225 public int getJdbcMappingCount()
226 {
227 return _jdbcMappingList.size();
228 } //-- int getJdbcMappingCount()
229
230 /***
231 * Returns the value of field 'maxTableNameLength'.
232 *
233 * @return the value of field 'maxTableNameLength'.
234 **/
235 public java.lang.String getMaxTableNameLength()
236 {
237 return this._maxTableNameLength;
238 } //-- java.lang.String getMaxTableNameLength()
239
240 /***
241 * Returns the value of field 'modifyColumn'.
242 *
243 * @return the value of field 'modifyColumn'.
244 **/
245 public java.lang.String getModifyColumn()
246 {
247 return this._modifyColumn;
248 } //-- java.lang.String getModifyColumn()
249
250 /***
251 * Returns the value of field 'name'.
252 *
253 * @return the value of field 'name'.
254 **/
255 public java.lang.String getName()
256 {
257 return this._name;
258 } //-- java.lang.String getName()
259
260 /***
261 * Returns the value of field 'notNull'.
262 *
263 * @return the value of field 'notNull'.
264 **/
265 public java.lang.String getNotNull()
266 {
267 return this._notNull;
268 } //-- java.lang.String getNotNull()
269
270 /***
271 * Returns the value of field 'null'.
272 *
273 * @return the value of field 'null'.
274 **/
275 public java.lang.String getNull()
276 {
277 return this._null;
278 } //-- java.lang.String getNull()
279
280 /***
281 * Returns the value of field 'parenthesesWrappedDdlColumns'.
282 *
283 * @return the value of field 'parenthesesWrappedDdlColumns'.
284 **/
285 public boolean getParenthesesWrappedDdlColumns()
286 {
287 return this._parenthesesWrappedDdlColumns;
288 } //-- boolean getParenthesesWrappedDdlColumns()
289
290 /***
291 * Returns the value of field 'primaryKey'.
292 *
293 * @return the value of field 'primaryKey'.
294 **/
295 public java.lang.String getPrimaryKey()
296 {
297 return this._primaryKey;
298 } //-- java.lang.String getPrimaryKey()
299
300 /***
301 **/
302 public boolean hasParenthesesWrappedDdlColumns()
303 {
304 return this._has_parenthesesWrappedDdlColumns;
305 } //-- boolean hasParenthesesWrappedDdlColumns()
306
307 /***
308 **/
309 public boolean isValid()
310 {
311 try {
312 validate();
313 }
314 catch (org.exolab.castor.xml.ValidationException vex) {
315 return false;
316 }
317 return true;
318 } //-- boolean isValid()
319
320 /***
321 *
322 *
323 * @param out
324 **/
325 public void marshal(java.io.Writer out)
326 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
327 {
328
329 Marshaller.marshal(this, out);
330 } //-- void marshal(java.io.Writer)
331
332 /***
333 *
334 *
335 * @param handler
336 **/
337 public void marshal(org.xml.sax.ContentHandler handler)
338 throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
339 {
340
341 Marshaller.marshal(this, handler);
342 } //-- void marshal(org.xml.sax.ContentHandler)
343
344 /***
345 **/
346 public void removeAllFunction()
347 {
348 _functionList.removeAllElements();
349 } //-- void removeAllFunction()
350
351 /***
352 **/
353 public void removeAllJdbcMapping()
354 {
355 _jdbcMappingList.removeAllElements();
356 } //-- void removeAllJdbcMapping()
357
358 /***
359 *
360 *
361 * @param index
362 **/
363 public Function removeFunction(int index)
364 {
365 java.lang.Object obj = _functionList.elementAt(index);
366 _functionList.removeElementAt(index);
367 return (Function) obj;
368 } //-- Function removeFunction(int)
369
370 /***
371 *
372 *
373 * @param index
374 **/
375 public JdbcMapping removeJdbcMapping(int index)
376 {
377 java.lang.Object obj = _jdbcMappingList.elementAt(index);
378 _jdbcMappingList.removeElementAt(index);
379 return (JdbcMapping) obj;
380 } //-- JdbcMapping removeJdbcMapping(int)
381
382 /***
383 * Sets the value of field 'autoincrement'.
384 *
385 * @param autoincrement the value of field 'autoincrement'.
386 **/
387 public void setAutoincrement(java.lang.String autoincrement)
388 {
389 this._autoincrement = autoincrement;
390 } //-- void setAutoincrement(java.lang.String)
391
392 /***
393 * Sets the value of field 'default'.
394 *
395 * @param _default
396 * @param default the value of field 'default'.
397 **/
398 public void setDefault(java.lang.String _default)
399 {
400 this._default = _default;
401 } //-- void setDefault(java.lang.String)
402
403 /***
404 *
405 *
406 * @param index
407 * @param vFunction
408 **/
409 public void setFunction(int index, Function vFunction)
410 throws java.lang.IndexOutOfBoundsException
411 {
412 //-- check bounds for index
413 if ((index < 0) || (index > _functionList.size())) {
414 throw new IndexOutOfBoundsException();
415 }
416 _functionList.setElementAt(vFunction, index);
417 } //-- void setFunction(int, Function)
418
419 /***
420 *
421 *
422 * @param functionArray
423 **/
424 public void setFunction(Function[] functionArray)
425 {
426 //-- copy array
427 _functionList.removeAllElements();
428 for (int i = 0; i < functionArray.length; i++) {
429 _functionList.addElement(functionArray[i]);
430 }
431 } //-- void setFunction(Function)
432
433 /***
434 *
435 *
436 * @param index
437 * @param vJdbcMapping
438 **/
439 public void setJdbcMapping(int index, JdbcMapping vJdbcMapping)
440 throws java.lang.IndexOutOfBoundsException
441 {
442 //-- check bounds for index
443 if ((index < 0) || (index > _jdbcMappingList.size())) {
444 throw new IndexOutOfBoundsException();
445 }
446 _jdbcMappingList.setElementAt(vJdbcMapping, index);
447 } //-- void setJdbcMapping(int, JdbcMapping)
448
449 /***
450 *
451 *
452 * @param jdbcMappingArray
453 **/
454 public void setJdbcMapping(JdbcMapping[] jdbcMappingArray)
455 {
456 //-- copy array
457 _jdbcMappingList.removeAllElements();
458 for (int i = 0; i < jdbcMappingArray.length; i++) {
459 _jdbcMappingList.addElement(jdbcMappingArray[i]);
460 }
461 } //-- void setJdbcMapping(JdbcMapping)
462
463 /***
464 * Sets the value of field 'maxTableNameLength'.
465 *
466 * @param maxTableNameLength the value of field
467 * 'maxTableNameLength'.
468 **/
469 public void setMaxTableNameLength(java.lang.String maxTableNameLength)
470 {
471 this._maxTableNameLength = maxTableNameLength;
472 } //-- void setMaxTableNameLength(java.lang.String)
473
474 /***
475 * Sets the value of field 'modifyColumn'.
476 *
477 * @param modifyColumn the value of field 'modifyColumn'.
478 **/
479 public void setModifyColumn(java.lang.String modifyColumn)
480 {
481 this._modifyColumn = modifyColumn;
482 } //-- void setModifyColumn(java.lang.String)
483
484 /***
485 * Sets the value of field 'name'.
486 *
487 * @param name the value of field 'name'.
488 **/
489 public void setName(java.lang.String name)
490 {
491 this._name = name;
492 } //-- void setName(java.lang.String)
493
494 /***
495 * Sets the value of field 'notNull'.
496 *
497 * @param notNull the value of field 'notNull'.
498 **/
499 public void setNotNull(java.lang.String notNull)
500 {
501 this._notNull = notNull;
502 } //-- void setNotNull(java.lang.String)
503
504 /***
505 * Sets the value of field 'null'.
506 *
507 * @param _null
508 * @param null the value of field 'null'.
509 **/
510 public void setNull(java.lang.String _null)
511 {
512 this._null = _null;
513 } //-- void setNull(java.lang.String)
514
515 /***
516 * Sets the value of field 'parenthesesWrappedDdlColumns'.
517 *
518 * @param parenthesesWrappedDdlColumns the value of field
519 * 'parenthesesWrappedDdlColumns'.
520 **/
521 public void setParenthesesWrappedDdlColumns(boolean parenthesesWrappedDdlColumns)
522 {
523 this._parenthesesWrappedDdlColumns = parenthesesWrappedDdlColumns;
524 this._has_parenthesesWrappedDdlColumns = true;
525 } //-- void setParenthesesWrappedDdlColumns(boolean)
526
527 /***
528 * Sets the value of field 'primaryKey'.
529 *
530 * @param primaryKey the value of field 'primaryKey'.
531 **/
532 public void setPrimaryKey(java.lang.String primaryKey)
533 {
534 this._primaryKey = primaryKey;
535 } //-- void setPrimaryKey(java.lang.String)
536
537 /***
538 *
539 *
540 * @param reader
541 **/
542 public static org.enableit.db.beans.DarrtDbms unmarshal(java.io.Reader reader)
543 throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
544 {
545 return (org.enableit.db.beans.DarrtDbms) Unmarshaller.unmarshal(org.enableit.db.beans.DarrtDbms.class, reader);
546 } //-- org.enableit.db.beans.DarrtDbms unmarshal(java.io.Reader)
547
548 /***
549 **/
550 public void validate()
551 throws org.exolab.castor.xml.ValidationException
552 {
553 org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
554 validator.validate(this);
555 } //-- void validate()
556
557 }
This page was automatically generated by Maven