View Javadoc
1   /*
2    * This class was automatically generated with 
3    * <a href="http://www.castor.org">Castor 1.3.1</a>, using an XML
4    * Schema.
5    * $Id$
6    */
7   
8   package org.exolab.castor.mapping.xml;
9   
10  /**
11   * Class MappingRoot.
12   * 
13   * @version $Revision$ $Date$
14   */
15  @SuppressWarnings("serial")
16  public class MappingRoot implements java.io.Serializable {
17  
18  
19        //--------------------------/
20       //- Class/Member Variables -/
21      //--------------------------/
22  
23      /**
24       * Field _description.
25       */
26      private java.lang.String _description;
27  
28      /**
29       * Field _includeList.
30       */
31      private java.util.List<org.exolab.castor.mapping.xml.Include> _includeList;
32  
33      /**
34       * Field _fieldHandlerDefList.
35       */
36      private java.util.List<org.exolab.castor.mapping.xml.FieldHandlerDef> _fieldHandlerDefList;
37  
38      /**
39       * The 'class' element is used to store information about
40       * mapping of a class.
41       *  
42       */
43      private java.util.List<org.exolab.castor.mapping.xml.ClassMapping> _classMappingList;
44  
45      /**
46       * Field _keyGeneratorDefList.
47       */
48      private java.util.List<org.exolab.castor.mapping.xml.KeyGeneratorDef> _keyGeneratorDefList;
49  
50  
51        //----------------/
52       //- Constructors -/
53      //----------------/
54  
55      public MappingRoot() {
56          super();
57          this._includeList = new java.util.ArrayList<org.exolab.castor.mapping.xml.Include>();
58          this._fieldHandlerDefList = new java.util.ArrayList<org.exolab.castor.mapping.xml.FieldHandlerDef>();
59          this._classMappingList = new java.util.ArrayList<org.exolab.castor.mapping.xml.ClassMapping>();
60          this._keyGeneratorDefList = new java.util.ArrayList<org.exolab.castor.mapping.xml.KeyGeneratorDef>();
61      }
62  
63  
64        //-----------/
65       //- Methods -/
66      //-----------/
67  
68      /**
69       * 
70       * 
71       * @param vClassMapping
72       * @throws java.lang.IndexOutOfBoundsException if the index
73       * given is outside the bounds of the collection
74       */
75      public void addClassMapping(
76              final org.exolab.castor.mapping.xml.ClassMapping vClassMapping)
77      throws java.lang.IndexOutOfBoundsException {
78          this._classMappingList.add(vClassMapping);
79      }
80  
81      /**
82       * 
83       * 
84       * @param index
85       * @param vClassMapping
86       * @throws java.lang.IndexOutOfBoundsException if the index
87       * given is outside the bounds of the collection
88       */
89      public void addClassMapping(
90              final int index,
91              final org.exolab.castor.mapping.xml.ClassMapping vClassMapping)
92      throws java.lang.IndexOutOfBoundsException {
93          this._classMappingList.add(index, vClassMapping);
94      }
95  
96      /**
97       * 
98       * 
99       * @param vFieldHandlerDef
100      * @throws java.lang.IndexOutOfBoundsException if the index
101      * given is outside the bounds of the collection
102      */
103     public void addFieldHandlerDef(
104             final org.exolab.castor.mapping.xml.FieldHandlerDef vFieldHandlerDef)
105     throws java.lang.IndexOutOfBoundsException {
106         this._fieldHandlerDefList.add(vFieldHandlerDef);
107     }
108 
109     /**
110      * 
111      * 
112      * @param index
113      * @param vFieldHandlerDef
114      * @throws java.lang.IndexOutOfBoundsException if the index
115      * given is outside the bounds of the collection
116      */
117     public void addFieldHandlerDef(
118             final int index,
119             final org.exolab.castor.mapping.xml.FieldHandlerDef vFieldHandlerDef)
120     throws java.lang.IndexOutOfBoundsException {
121         this._fieldHandlerDefList.add(index, vFieldHandlerDef);
122     }
123 
124     /**
125      * 
126      * 
127      * @param vInclude
128      * @throws java.lang.IndexOutOfBoundsException if the index
129      * given is outside the bounds of the collection
130      */
131     public void addInclude(
132             final org.exolab.castor.mapping.xml.Include vInclude)
133     throws java.lang.IndexOutOfBoundsException {
134         this._includeList.add(vInclude);
135     }
136 
137     /**
138      * 
139      * 
140      * @param index
141      * @param vInclude
142      * @throws java.lang.IndexOutOfBoundsException if the index
143      * given is outside the bounds of the collection
144      */
145     public void addInclude(
146             final int index,
147             final org.exolab.castor.mapping.xml.Include vInclude)
148     throws java.lang.IndexOutOfBoundsException {
149         this._includeList.add(index, vInclude);
150     }
151 
152     /**
153      * 
154      * 
155      * @param vKeyGeneratorDef
156      * @throws java.lang.IndexOutOfBoundsException if the index
157      * given is outside the bounds of the collection
158      */
159     public void addKeyGeneratorDef(
160             final org.exolab.castor.mapping.xml.KeyGeneratorDef vKeyGeneratorDef)
161     throws java.lang.IndexOutOfBoundsException {
162         this._keyGeneratorDefList.add(vKeyGeneratorDef);
163     }
164 
165     /**
166      * 
167      * 
168      * @param index
169      * @param vKeyGeneratorDef
170      * @throws java.lang.IndexOutOfBoundsException if the index
171      * given is outside the bounds of the collection
172      */
173     public void addKeyGeneratorDef(
174             final int index,
175             final org.exolab.castor.mapping.xml.KeyGeneratorDef vKeyGeneratorDef)
176     throws java.lang.IndexOutOfBoundsException {
177         this._keyGeneratorDefList.add(index, vKeyGeneratorDef);
178     }
179 
180     /**
181      * Method enumerateClassMapping.
182      * 
183      * @return an Enumeration over all possible elements of this
184      * collection
185      */
186     public java.util.Enumeration<? extends org.exolab.castor.mapping.xml.ClassMapping> enumerateClassMapping(
187     ) {
188         return java.util.Collections.enumeration(this._classMappingList);
189     }
190 
191     /**
192      * Method enumerateFieldHandlerDef.
193      * 
194      * @return an Enumeration over all possible elements of this
195      * collection
196      */
197     public java.util.Enumeration<? extends org.exolab.castor.mapping.xml.FieldHandlerDef> enumerateFieldHandlerDef(
198     ) {
199         return java.util.Collections.enumeration(this._fieldHandlerDefList);
200     }
201 
202     /**
203      * Method enumerateInclude.
204      * 
205      * @return an Enumeration over all possible elements of this
206      * collection
207      */
208     public java.util.Enumeration<? extends org.exolab.castor.mapping.xml.Include> enumerateInclude(
209     ) {
210         return java.util.Collections.enumeration(this._includeList);
211     }
212 
213     /**
214      * Method enumerateKeyGeneratorDef.
215      * 
216      * @return an Enumeration over all possible elements of this
217      * collection
218      */
219     public java.util.Enumeration<? extends org.exolab.castor.mapping.xml.KeyGeneratorDef> enumerateKeyGeneratorDef(
220     ) {
221         return java.util.Collections.enumeration(this._keyGeneratorDefList);
222     }
223 
224     /**
225      * Method getClassMapping.
226      * 
227      * @param index
228      * @throws java.lang.IndexOutOfBoundsException if the index
229      * given is outside the bounds of the collection
230      * @return the value of the
231      * org.exolab.castor.mapping.xml.ClassMapping at the given index
232      */
233     public org.exolab.castor.mapping.xml.ClassMapping getClassMapping(
234             final int index)
235     throws java.lang.IndexOutOfBoundsException {
236         // check bounds for index
237         if (index < 0 || index >= this._classMappingList.size()) {
238             throw new IndexOutOfBoundsException("getClassMapping: Index value '" + index + "' not in range [0.." + (this._classMappingList.size() - 1) + "]");
239         }
240 
241         return (org.exolab.castor.mapping.xml.ClassMapping) _classMappingList.get(index);
242     }
243 
244     /**
245      * Method getClassMapping.Returns the contents of the
246      * collection in an Array.  <p>Note:  Just in case the
247      * collection contents are changing in another thread, we pass
248      * a 0-length Array of the correct type into the API call. 
249      * This way we <i>know</i> that the Array returned is of
250      * exactly the correct length.
251      * 
252      * @return this collection as an Array
253      */
254     public org.exolab.castor.mapping.xml.ClassMapping[] getClassMapping(
255     ) {
256         org.exolab.castor.mapping.xml.ClassMapping[] array = new org.exolab.castor.mapping.xml.ClassMapping[0];
257         return (org.exolab.castor.mapping.xml.ClassMapping[]) this._classMappingList.toArray(array);
258     }
259 
260     /**
261      * Method getClassMappingCount.
262      * 
263      * @return the size of this collection
264      */
265     public int getClassMappingCount(
266     ) {
267         return this._classMappingList.size();
268     }
269 
270     /**
271      * Returns the value of field 'description'.
272      * 
273      * @return the value of field 'Description'.
274      */
275     public java.lang.String getDescription(
276     ) {
277         return this._description;
278     }
279 
280     /**
281      * Method getFieldHandlerDef.
282      * 
283      * @param index
284      * @throws java.lang.IndexOutOfBoundsException if the index
285      * given is outside the bounds of the collection
286      * @return the value of the
287      * org.exolab.castor.mapping.xml.FieldHandlerDef at the given
288      * index
289      */
290     public org.exolab.castor.mapping.xml.FieldHandlerDef getFieldHandlerDef(
291             final int index)
292     throws java.lang.IndexOutOfBoundsException {
293         // check bounds for index
294         if (index < 0 || index >= this._fieldHandlerDefList.size()) {
295             throw new IndexOutOfBoundsException("getFieldHandlerDef: Index value '" + index + "' not in range [0.." + (this._fieldHandlerDefList.size() - 1) + "]");
296         }
297 
298         return (org.exolab.castor.mapping.xml.FieldHandlerDef) _fieldHandlerDefList.get(index);
299     }
300 
301     /**
302      * Method getFieldHandlerDef.Returns the contents of the
303      * collection in an Array.  <p>Note:  Just in case the
304      * collection contents are changing in another thread, we pass
305      * a 0-length Array of the correct type into the API call. 
306      * This way we <i>know</i> that the Array returned is of
307      * exactly the correct length.
308      * 
309      * @return this collection as an Array
310      */
311     public org.exolab.castor.mapping.xml.FieldHandlerDef[] getFieldHandlerDef(
312     ) {
313         org.exolab.castor.mapping.xml.FieldHandlerDef[] array = new org.exolab.castor.mapping.xml.FieldHandlerDef[0];
314         return (org.exolab.castor.mapping.xml.FieldHandlerDef[]) this._fieldHandlerDefList.toArray(array);
315     }
316 
317     /**
318      * Method getFieldHandlerDefCount.
319      * 
320      * @return the size of this collection
321      */
322     public int getFieldHandlerDefCount(
323     ) {
324         return this._fieldHandlerDefList.size();
325     }
326 
327     /**
328      * Method getInclude.
329      * 
330      * @param index
331      * @throws java.lang.IndexOutOfBoundsException if the index
332      * given is outside the bounds of the collection
333      * @return the value of the
334      * org.exolab.castor.mapping.xml.Include at the given index
335      */
336     public org.exolab.castor.mapping.xml.Include getInclude(
337             final int index)
338     throws java.lang.IndexOutOfBoundsException {
339         // check bounds for index
340         if (index < 0 || index >= this._includeList.size()) {
341             throw new IndexOutOfBoundsException("getInclude: Index value '" + index + "' not in range [0.." + (this._includeList.size() - 1) + "]");
342         }
343 
344         return (org.exolab.castor.mapping.xml.Include) _includeList.get(index);
345     }
346 
347     /**
348      * Method getInclude.Returns the contents of the collection in
349      * an Array.  <p>Note:  Just in case the collection contents
350      * are changing in another thread, we pass a 0-length Array of
351      * the correct type into the API call.  This way we <i>know</i>
352      * that the Array returned is of exactly the correct length.
353      * 
354      * @return this collection as an Array
355      */
356     public org.exolab.castor.mapping.xml.Include[] getInclude(
357     ) {
358         org.exolab.castor.mapping.xml.Include[] array = new org.exolab.castor.mapping.xml.Include[0];
359         return (org.exolab.castor.mapping.xml.Include[]) this._includeList.toArray(array);
360     }
361 
362     /**
363      * Method getIncludeCount.
364      * 
365      * @return the size of this collection
366      */
367     public int getIncludeCount(
368     ) {
369         return this._includeList.size();
370     }
371 
372     /**
373      * Method getKeyGeneratorDef.
374      * 
375      * @param index
376      * @throws java.lang.IndexOutOfBoundsException if the index
377      * given is outside the bounds of the collection
378      * @return the value of the
379      * org.exolab.castor.mapping.xml.KeyGeneratorDef at the given
380      * index
381      */
382     public org.exolab.castor.mapping.xml.KeyGeneratorDef getKeyGeneratorDef(
383             final int index)
384     throws java.lang.IndexOutOfBoundsException {
385         // check bounds for index
386         if (index < 0 || index >= this._keyGeneratorDefList.size()) {
387             throw new IndexOutOfBoundsException("getKeyGeneratorDef: Index value '" + index + "' not in range [0.." + (this._keyGeneratorDefList.size() - 1) + "]");
388         }
389 
390         return (org.exolab.castor.mapping.xml.KeyGeneratorDef) _keyGeneratorDefList.get(index);
391     }
392 
393     /**
394      * Method getKeyGeneratorDef.Returns the contents of the
395      * collection in an Array.  <p>Note:  Just in case the
396      * collection contents are changing in another thread, we pass
397      * a 0-length Array of the correct type into the API call. 
398      * This way we <i>know</i> that the Array returned is of
399      * exactly the correct length.
400      * 
401      * @return this collection as an Array
402      */
403     public org.exolab.castor.mapping.xml.KeyGeneratorDef[] getKeyGeneratorDef(
404     ) {
405         org.exolab.castor.mapping.xml.KeyGeneratorDef[] array = new org.exolab.castor.mapping.xml.KeyGeneratorDef[0];
406         return (org.exolab.castor.mapping.xml.KeyGeneratorDef[]) this._keyGeneratorDefList.toArray(array);
407     }
408 
409     /**
410      * Method getKeyGeneratorDefCount.
411      * 
412      * @return the size of this collection
413      */
414     public int getKeyGeneratorDefCount(
415     ) {
416         return this._keyGeneratorDefList.size();
417     }
418 
419     /**
420      * Method isValid.
421      * 
422      * @return true if this object is valid according to the schema
423      */
424     public boolean isValid(
425     ) {
426         try {
427             validate();
428         } catch (org.exolab.castor.xml.ValidationException vex) {
429             return false;
430         }
431         return true;
432     }
433 
434     /**
435      * Method iterateClassMapping.
436      * 
437      * @return an Iterator over all possible elements in this
438      * collection
439      */
440     public java.util.Iterator<? extends org.exolab.castor.mapping.xml.ClassMapping> iterateClassMapping(
441     ) {
442         return this._classMappingList.iterator();
443     }
444 
445     /**
446      * Method iterateFieldHandlerDef.
447      * 
448      * @return an Iterator over all possible elements in this
449      * collection
450      */
451     public java.util.Iterator<? extends org.exolab.castor.mapping.xml.FieldHandlerDef> iterateFieldHandlerDef(
452     ) {
453         return this._fieldHandlerDefList.iterator();
454     }
455 
456     /**
457      * Method iterateInclude.
458      * 
459      * @return an Iterator over all possible elements in this
460      * collection
461      */
462     public java.util.Iterator<? extends org.exolab.castor.mapping.xml.Include> iterateInclude(
463     ) {
464         return this._includeList.iterator();
465     }
466 
467     /**
468      * Method iterateKeyGeneratorDef.
469      * 
470      * @return an Iterator over all possible elements in this
471      * collection
472      */
473     public java.util.Iterator<? extends org.exolab.castor.mapping.xml.KeyGeneratorDef> iterateKeyGeneratorDef(
474     ) {
475         return this._keyGeneratorDefList.iterator();
476     }
477 
478     /**
479      * 
480      * 
481      * @param out
482      * @throws org.exolab.castor.xml.MarshalException if object is
483      * null or if any SAXException is thrown during marshaling
484      * @throws org.exolab.castor.xml.ValidationException if this
485      * object is an invalid instance according to the schema
486      */
487     public void marshal(
488             final java.io.Writer out)
489     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
490         org.exolab.castor.xml.Marshaller.marshal(this, out);
491     }
492 
493     /**
494      * 
495      * 
496      * @param handler
497      * @throws java.io.IOException if an IOException occurs during
498      * marshaling
499      * @throws org.exolab.castor.xml.ValidationException if this
500      * object is an invalid instance according to the schema
501      * @throws org.exolab.castor.xml.MarshalException if object is
502      * null or if any SAXException is thrown during marshaling
503      */
504     public void marshal(
505             final org.xml.sax.ContentHandler handler)
506     throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
507         org.exolab.castor.xml.Marshaller.marshal(this, handler);
508     }
509 
510     /**
511      */
512     public void removeAllClassMapping(
513     ) {
514         this._classMappingList.clear();
515     }
516 
517     /**
518      */
519     public void removeAllFieldHandlerDef(
520     ) {
521         this._fieldHandlerDefList.clear();
522     }
523 
524     /**
525      */
526     public void removeAllInclude(
527     ) {
528         this._includeList.clear();
529     }
530 
531     /**
532      */
533     public void removeAllKeyGeneratorDef(
534     ) {
535         this._keyGeneratorDefList.clear();
536     }
537 
538     /**
539      * Method removeClassMapping.
540      * 
541      * @param vClassMapping
542      * @return true if the object was removed from the collection.
543      */
544     public boolean removeClassMapping(
545             final org.exolab.castor.mapping.xml.ClassMapping vClassMapping) {
546         boolean removed = _classMappingList.remove(vClassMapping);
547         return removed;
548     }
549 
550     /**
551      * Method removeClassMappingAt.
552      * 
553      * @param index
554      * @return the element removed from the collection
555      */
556     public org.exolab.castor.mapping.xml.ClassMapping removeClassMappingAt(
557             final int index) {
558         java.lang.Object obj = this._classMappingList.remove(index);
559         return (org.exolab.castor.mapping.xml.ClassMapping) obj;
560     }
561 
562     /**
563      * Method removeFieldHandlerDef.
564      * 
565      * @param vFieldHandlerDef
566      * @return true if the object was removed from the collection.
567      */
568     public boolean removeFieldHandlerDef(
569             final org.exolab.castor.mapping.xml.FieldHandlerDef vFieldHandlerDef) {
570         boolean removed = _fieldHandlerDefList.remove(vFieldHandlerDef);
571         return removed;
572     }
573 
574     /**
575      * Method removeFieldHandlerDefAt.
576      * 
577      * @param index
578      * @return the element removed from the collection
579      */
580     public org.exolab.castor.mapping.xml.FieldHandlerDef removeFieldHandlerDefAt(
581             final int index) {
582         java.lang.Object obj = this._fieldHandlerDefList.remove(index);
583         return (org.exolab.castor.mapping.xml.FieldHandlerDef) obj;
584     }
585 
586     /**
587      * Method removeInclude.
588      * 
589      * @param vInclude
590      * @return true if the object was removed from the collection.
591      */
592     public boolean removeInclude(
593             final org.exolab.castor.mapping.xml.Include vInclude) {
594         boolean removed = _includeList.remove(vInclude);
595         return removed;
596     }
597 
598     /**
599      * Method removeIncludeAt.
600      * 
601      * @param index
602      * @return the element removed from the collection
603      */
604     public org.exolab.castor.mapping.xml.Include removeIncludeAt(
605             final int index) {
606         java.lang.Object obj = this._includeList.remove(index);
607         return (org.exolab.castor.mapping.xml.Include) obj;
608     }
609 
610     /**
611      * Method removeKeyGeneratorDef.
612      * 
613      * @param vKeyGeneratorDef
614      * @return true if the object was removed from the collection.
615      */
616     public boolean removeKeyGeneratorDef(
617             final org.exolab.castor.mapping.xml.KeyGeneratorDef vKeyGeneratorDef) {
618         boolean removed = _keyGeneratorDefList.remove(vKeyGeneratorDef);
619         return removed;
620     }
621 
622     /**
623      * Method removeKeyGeneratorDefAt.
624      * 
625      * @param index
626      * @return the element removed from the collection
627      */
628     public org.exolab.castor.mapping.xml.KeyGeneratorDef removeKeyGeneratorDefAt(
629             final int index) {
630         java.lang.Object obj = this._keyGeneratorDefList.remove(index);
631         return (org.exolab.castor.mapping.xml.KeyGeneratorDef) obj;
632     }
633 
634     /**
635      * 
636      * 
637      * @param index
638      * @param vClassMapping
639      * @throws java.lang.IndexOutOfBoundsException if the index
640      * given is outside the bounds of the collection
641      */
642     public void setClassMapping(
643             final int index,
644             final org.exolab.castor.mapping.xml.ClassMapping vClassMapping)
645     throws java.lang.IndexOutOfBoundsException {
646         // check bounds for index
647         if (index < 0 || index >= this._classMappingList.size()) {
648             throw new IndexOutOfBoundsException("setClassMapping: Index value '" + index + "' not in range [0.." + (this._classMappingList.size() - 1) + "]");
649         }
650 
651         this._classMappingList.set(index, vClassMapping);
652     }
653 
654     /**
655      * 
656      * 
657      * @param vClassMappingArray
658      */
659     public void setClassMapping(
660             final org.exolab.castor.mapping.xml.ClassMapping[] vClassMappingArray) {
661         //-- copy array
662         _classMappingList.clear();
663 
664         for (int i = 0; i < vClassMappingArray.length; i++) {
665                 this._classMappingList.add(vClassMappingArray[i]);
666         }
667     }
668 
669     /**
670      * Sets the value of field 'description'.
671      * 
672      * @param description the value of field 'description'.
673      */
674     public void setDescription(
675             final java.lang.String description) {
676         this._description = description;
677     }
678 
679     /**
680      * 
681      * 
682      * @param index
683      * @param vFieldHandlerDef
684      * @throws java.lang.IndexOutOfBoundsException if the index
685      * given is outside the bounds of the collection
686      */
687     public void setFieldHandlerDef(
688             final int index,
689             final org.exolab.castor.mapping.xml.FieldHandlerDef vFieldHandlerDef)
690     throws java.lang.IndexOutOfBoundsException {
691         // check bounds for index
692         if (index < 0 || index >= this._fieldHandlerDefList.size()) {
693             throw new IndexOutOfBoundsException("setFieldHandlerDef: Index value '" + index + "' not in range [0.." + (this._fieldHandlerDefList.size() - 1) + "]");
694         }
695 
696         this._fieldHandlerDefList.set(index, vFieldHandlerDef);
697     }
698 
699     /**
700      * 
701      * 
702      * @param vFieldHandlerDefArray
703      */
704     public void setFieldHandlerDef(
705             final org.exolab.castor.mapping.xml.FieldHandlerDef[] vFieldHandlerDefArray) {
706         //-- copy array
707         _fieldHandlerDefList.clear();
708 
709         for (int i = 0; i < vFieldHandlerDefArray.length; i++) {
710                 this._fieldHandlerDefList.add(vFieldHandlerDefArray[i]);
711         }
712     }
713 
714     /**
715      * 
716      * 
717      * @param index
718      * @param vInclude
719      * @throws java.lang.IndexOutOfBoundsException if the index
720      * given is outside the bounds of the collection
721      */
722     public void setInclude(
723             final int index,
724             final org.exolab.castor.mapping.xml.Include vInclude)
725     throws java.lang.IndexOutOfBoundsException {
726         // check bounds for index
727         if (index < 0 || index >= this._includeList.size()) {
728             throw new IndexOutOfBoundsException("setInclude: Index value '" + index + "' not in range [0.." + (this._includeList.size() - 1) + "]");
729         }
730 
731         this._includeList.set(index, vInclude);
732     }
733 
734     /**
735      * 
736      * 
737      * @param vIncludeArray
738      */
739     public void setInclude(
740             final org.exolab.castor.mapping.xml.Include[] vIncludeArray) {
741         //-- copy array
742         _includeList.clear();
743 
744         for (int i = 0; i < vIncludeArray.length; i++) {
745                 this._includeList.add(vIncludeArray[i]);
746         }
747     }
748 
749     /**
750      * 
751      * 
752      * @param index
753      * @param vKeyGeneratorDef
754      * @throws java.lang.IndexOutOfBoundsException if the index
755      * given is outside the bounds of the collection
756      */
757     public void setKeyGeneratorDef(
758             final int index,
759             final org.exolab.castor.mapping.xml.KeyGeneratorDef vKeyGeneratorDef)
760     throws java.lang.IndexOutOfBoundsException {
761         // check bounds for index
762         if (index < 0 || index >= this._keyGeneratorDefList.size()) {
763             throw new IndexOutOfBoundsException("setKeyGeneratorDef: Index value '" + index + "' not in range [0.." + (this._keyGeneratorDefList.size() - 1) + "]");
764         }
765 
766         this._keyGeneratorDefList.set(index, vKeyGeneratorDef);
767     }
768 
769     /**
770      * 
771      * 
772      * @param vKeyGeneratorDefArray
773      */
774     public void setKeyGeneratorDef(
775             final org.exolab.castor.mapping.xml.KeyGeneratorDef[] vKeyGeneratorDefArray) {
776         //-- copy array
777         _keyGeneratorDefList.clear();
778 
779         for (int i = 0; i < vKeyGeneratorDefArray.length; i++) {
780                 this._keyGeneratorDefList.add(vKeyGeneratorDefArray[i]);
781         }
782     }
783 
784     /**
785      * Method unmarshal.
786      * 
787      * @param reader
788      * @throws org.exolab.castor.xml.MarshalException if object is
789      * null or if any SAXException is thrown during marshaling
790      * @throws org.exolab.castor.xml.ValidationException if this
791      * object is an invalid instance according to the schema
792      * @return the unmarshaled
793      * org.exolab.castor.mapping.xml.MappingRoot
794      */
795     public static org.exolab.castor.mapping.xml.MappingRoot unmarshal(
796             final java.io.Reader reader)
797     throws org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException {
798         return (org.exolab.castor.mapping.xml.MappingRoot) org.exolab.castor.xml.Unmarshaller.unmarshal(org.exolab.castor.mapping.xml.MappingRoot.class, reader);
799     }
800 
801     /**
802      * 
803      * 
804      * @throws org.exolab.castor.xml.ValidationException if this
805      * object is an invalid instance according to the schema
806      */
807     public void validate(
808     )
809     throws org.exolab.castor.xml.ValidationException {
810         org.exolab.castor.xml.Validator validator = new org.exolab.castor.xml.Validator();
811         validator.validate(this);
812     }
813 
814 }