001    /*
002     * XML Type:  sasMechType
003     * Namespace: http://openejb.apache.org/xml/ns/corba-tss-config-2.1
004     * Java type: org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType
005     *
006     * Automatically generated - do not modify.
007     */
008    package org.apache.geronimo.corba.xbeans.csiv2.tss.impl;
009    /**
010     * An XML sasMechType(@http://openejb.apache.org/xml/ns/corba-tss-config-2.1).
011     *
012     * This is a complex type.
013     */
014    public class TSSSasMechTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType
015    {
016        
017        public TSSSasMechTypeImpl(org.apache.xmlbeans.SchemaType sType)
018        {
019            super(sType);
020        }
021        
022        private static final javax.xml.namespace.QName DESCRIPTION$0 = 
023            new javax.xml.namespace.QName("http://openejb.apache.org/xml/ns/corba-tss-config-2.1", "description");
024        private static final javax.xml.namespace.QName SERVICECONFIGURATIONLIST$2 = 
025            new javax.xml.namespace.QName("http://openejb.apache.org/xml/ns/corba-tss-config-2.1", "serviceConfigurationList");
026        private static final javax.xml.namespace.QName IDENTITYTOKENTYPES$4 = 
027            new javax.xml.namespace.QName("http://openejb.apache.org/xml/ns/corba-tss-config-2.1", "identityTokenTypes");
028        
029        
030        /**
031         * Gets array of all "description" elements
032         */
033        public org.apache.geronimo.corba.xbeans.csiv2.tss.TSSDescriptionType[] getDescriptionArray()
034        {
035            synchronized (monitor())
036            {
037                check_orphaned();
038                java.util.List targetList = new java.util.ArrayList();
039                get_store().find_all_element_users(DESCRIPTION$0, targetList);
040                org.apache.geronimo.corba.xbeans.csiv2.tss.TSSDescriptionType[] result = new org.apache.geronimo.corba.xbeans.csiv2.tss.TSSDescriptionType[targetList.size()];
041                targetList.toArray(result);
042                return result;
043            }
044        }
045        
046        /**
047         * Gets ith "description" element
048         */
049        public org.apache.geronimo.corba.xbeans.csiv2.tss.TSSDescriptionType getDescriptionArray(int i)
050        {
051            synchronized (monitor())
052            {
053                check_orphaned();
054                org.apache.geronimo.corba.xbeans.csiv2.tss.TSSDescriptionType target = null;
055                target = (org.apache.geronimo.corba.xbeans.csiv2.tss.TSSDescriptionType)get_store().find_element_user(DESCRIPTION$0, i);
056                if (target == null)
057                {
058                    throw new IndexOutOfBoundsException();
059                }
060                return target;
061            }
062        }
063        
064        /**
065         * Returns number of "description" element
066         */
067        public int sizeOfDescriptionArray()
068        {
069            synchronized (monitor())
070            {
071                check_orphaned();
072                return get_store().count_elements(DESCRIPTION$0);
073            }
074        }
075        
076        /**
077         * Sets array of all "description" element
078         */
079        public void setDescriptionArray(org.apache.geronimo.corba.xbeans.csiv2.tss.TSSDescriptionType[] descriptionArray)
080        {
081            synchronized (monitor())
082            {
083                check_orphaned();
084                arraySetterHelper(descriptionArray, DESCRIPTION$0);
085            }
086        }
087        
088        /**
089         * Sets ith "description" element
090         */
091        public void setDescriptionArray(int i, org.apache.geronimo.corba.xbeans.csiv2.tss.TSSDescriptionType description)
092        {
093            synchronized (monitor())
094            {
095                check_orphaned();
096                org.apache.geronimo.corba.xbeans.csiv2.tss.TSSDescriptionType target = null;
097                target = (org.apache.geronimo.corba.xbeans.csiv2.tss.TSSDescriptionType)get_store().find_element_user(DESCRIPTION$0, i);
098                if (target == null)
099                {
100                    throw new IndexOutOfBoundsException();
101                }
102                target.set(description);
103            }
104        }
105        
106        /**
107         * Inserts and returns a new empty value (as xml) as the ith "description" element
108         */
109        public org.apache.geronimo.corba.xbeans.csiv2.tss.TSSDescriptionType insertNewDescription(int i)
110        {
111            synchronized (monitor())
112            {
113                check_orphaned();
114                org.apache.geronimo.corba.xbeans.csiv2.tss.TSSDescriptionType target = null;
115                target = (org.apache.geronimo.corba.xbeans.csiv2.tss.TSSDescriptionType)get_store().insert_element_user(DESCRIPTION$0, i);
116                return target;
117            }
118        }
119        
120        /**
121         * Appends and returns a new empty value (as xml) as the last "description" element
122         */
123        public org.apache.geronimo.corba.xbeans.csiv2.tss.TSSDescriptionType addNewDescription()
124        {
125            synchronized (monitor())
126            {
127                check_orphaned();
128                org.apache.geronimo.corba.xbeans.csiv2.tss.TSSDescriptionType target = null;
129                target = (org.apache.geronimo.corba.xbeans.csiv2.tss.TSSDescriptionType)get_store().add_element_user(DESCRIPTION$0);
130                return target;
131            }
132        }
133        
134        /**
135         * Removes the ith "description" element
136         */
137        public void removeDescription(int i)
138        {
139            synchronized (monitor())
140            {
141                check_orphaned();
142                get_store().remove_element(DESCRIPTION$0, i);
143            }
144        }
145        
146        /**
147         * Gets the "serviceConfigurationList" element
148         */
149        public org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList getServiceConfigurationList()
150        {
151            synchronized (monitor())
152            {
153                check_orphaned();
154                org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList target = null;
155                target = (org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList)get_store().find_element_user(SERVICECONFIGURATIONLIST$2, 0);
156                if (target == null)
157                {
158                    return null;
159                }
160                return target;
161            }
162        }
163        
164        /**
165         * True if has "serviceConfigurationList" element
166         */
167        public boolean isSetServiceConfigurationList()
168        {
169            synchronized (monitor())
170            {
171                check_orphaned();
172                return get_store().count_elements(SERVICECONFIGURATIONLIST$2) != 0;
173            }
174        }
175        
176        /**
177         * Sets the "serviceConfigurationList" element
178         */
179        public void setServiceConfigurationList(org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList serviceConfigurationList)
180        {
181            synchronized (monitor())
182            {
183                check_orphaned();
184                org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList target = null;
185                target = (org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList)get_store().find_element_user(SERVICECONFIGURATIONLIST$2, 0);
186                if (target == null)
187                {
188                    target = (org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList)get_store().add_element_user(SERVICECONFIGURATIONLIST$2);
189                }
190                target.set(serviceConfigurationList);
191            }
192        }
193        
194        /**
195         * Appends and returns a new empty "serviceConfigurationList" element
196         */
197        public org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList addNewServiceConfigurationList()
198        {
199            synchronized (monitor())
200            {
201                check_orphaned();
202                org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList target = null;
203                target = (org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList)get_store().add_element_user(SERVICECONFIGURATIONLIST$2);
204                return target;
205            }
206        }
207        
208        /**
209         * Unsets the "serviceConfigurationList" element
210         */
211        public void unsetServiceConfigurationList()
212        {
213            synchronized (monitor())
214            {
215                check_orphaned();
216                get_store().remove_element(SERVICECONFIGURATIONLIST$2, 0);
217            }
218        }
219        
220        /**
221         * Gets the "identityTokenTypes" element
222         */
223        public org.apache.geronimo.corba.xbeans.csiv2.tss.TSSIdentityTokenTypeList getIdentityTokenTypes()
224        {
225            synchronized (monitor())
226            {
227                check_orphaned();
228                org.apache.geronimo.corba.xbeans.csiv2.tss.TSSIdentityTokenTypeList target = null;
229                target = (org.apache.geronimo.corba.xbeans.csiv2.tss.TSSIdentityTokenTypeList)get_store().find_element_user(IDENTITYTOKENTYPES$4, 0);
230                if (target == null)
231                {
232                    return null;
233                }
234                return target;
235            }
236        }
237        
238        /**
239         * Sets the "identityTokenTypes" element
240         */
241        public void setIdentityTokenTypes(org.apache.geronimo.corba.xbeans.csiv2.tss.TSSIdentityTokenTypeList identityTokenTypes)
242        {
243            synchronized (monitor())
244            {
245                check_orphaned();
246                org.apache.geronimo.corba.xbeans.csiv2.tss.TSSIdentityTokenTypeList target = null;
247                target = (org.apache.geronimo.corba.xbeans.csiv2.tss.TSSIdentityTokenTypeList)get_store().find_element_user(IDENTITYTOKENTYPES$4, 0);
248                if (target == null)
249                {
250                    target = (org.apache.geronimo.corba.xbeans.csiv2.tss.TSSIdentityTokenTypeList)get_store().add_element_user(IDENTITYTOKENTYPES$4);
251                }
252                target.set(identityTokenTypes);
253            }
254        }
255        
256        /**
257         * Appends and returns a new empty "identityTokenTypes" element
258         */
259        public org.apache.geronimo.corba.xbeans.csiv2.tss.TSSIdentityTokenTypeList addNewIdentityTokenTypes()
260        {
261            synchronized (monitor())
262            {
263                check_orphaned();
264                org.apache.geronimo.corba.xbeans.csiv2.tss.TSSIdentityTokenTypeList target = null;
265                target = (org.apache.geronimo.corba.xbeans.csiv2.tss.TSSIdentityTokenTypeList)get_store().add_element_user(IDENTITYTOKENTYPES$4);
266                return target;
267            }
268        }
269        /**
270         * An XML serviceConfigurationList(@http://openejb.apache.org/xml/ns/corba-tss-config-2.1).
271         *
272         * This is a complex type.
273         */
274        public static class ServiceConfigurationListImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.geronimo.corba.xbeans.csiv2.tss.TSSSasMechType.ServiceConfigurationList
275        {
276            
277            public ServiceConfigurationListImpl(org.apache.xmlbeans.SchemaType sType)
278            {
279                super(sType);
280            }
281            
282            private static final javax.xml.namespace.QName GENERALNAME$0 = 
283                new javax.xml.namespace.QName("http://openejb.apache.org/xml/ns/corba-tss-config-2.1", "generalName");
284            private static final javax.xml.namespace.QName GSSEXPORTEDNAME$2 = 
285                new javax.xml.namespace.QName("http://openejb.apache.org/xml/ns/corba-tss-config-2.1", "gssExportedName");
286            private static final javax.xml.namespace.QName REQUIRED$4 = 
287                new javax.xml.namespace.QName("", "required");
288            
289            
290            /**
291             * Gets array of all "generalName" elements
292             */
293            public org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGeneralNameType[] getGeneralNameArray()
294            {
295                synchronized (monitor())
296                {
297                    check_orphaned();
298                    java.util.List targetList = new java.util.ArrayList();
299                    get_store().find_all_element_users(GENERALNAME$0, targetList);
300                    org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGeneralNameType[] result = new org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGeneralNameType[targetList.size()];
301                    targetList.toArray(result);
302                    return result;
303                }
304            }
305            
306            /**
307             * Gets ith "generalName" element
308             */
309            public org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGeneralNameType getGeneralNameArray(int i)
310            {
311                synchronized (monitor())
312                {
313                    check_orphaned();
314                    org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGeneralNameType target = null;
315                    target = (org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGeneralNameType)get_store().find_element_user(GENERALNAME$0, i);
316                    if (target == null)
317                    {
318                        throw new IndexOutOfBoundsException();
319                    }
320                    return target;
321                }
322            }
323            
324            /**
325             * Returns number of "generalName" element
326             */
327            public int sizeOfGeneralNameArray()
328            {
329                synchronized (monitor())
330                {
331                    check_orphaned();
332                    return get_store().count_elements(GENERALNAME$0);
333                }
334            }
335            
336            /**
337             * Sets array of all "generalName" element
338             */
339            public void setGeneralNameArray(org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGeneralNameType[] generalNameArray)
340            {
341                synchronized (monitor())
342                {
343                    check_orphaned();
344                    arraySetterHelper(generalNameArray, GENERALNAME$0);
345                }
346            }
347            
348            /**
349             * Sets ith "generalName" element
350             */
351            public void setGeneralNameArray(int i, org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGeneralNameType generalName)
352            {
353                synchronized (monitor())
354                {
355                    check_orphaned();
356                    org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGeneralNameType target = null;
357                    target = (org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGeneralNameType)get_store().find_element_user(GENERALNAME$0, i);
358                    if (target == null)
359                    {
360                        throw new IndexOutOfBoundsException();
361                    }
362                    target.set(generalName);
363                }
364            }
365            
366            /**
367             * Inserts and returns a new empty value (as xml) as the ith "generalName" element
368             */
369            public org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGeneralNameType insertNewGeneralName(int i)
370            {
371                synchronized (monitor())
372                {
373                    check_orphaned();
374                    org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGeneralNameType target = null;
375                    target = (org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGeneralNameType)get_store().insert_element_user(GENERALNAME$0, i);
376                    return target;
377                }
378            }
379            
380            /**
381             * Appends and returns a new empty value (as xml) as the last "generalName" element
382             */
383            public org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGeneralNameType addNewGeneralName()
384            {
385                synchronized (monitor())
386                {
387                    check_orphaned();
388                    org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGeneralNameType target = null;
389                    target = (org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGeneralNameType)get_store().add_element_user(GENERALNAME$0);
390                    return target;
391                }
392            }
393            
394            /**
395             * Removes the ith "generalName" element
396             */
397            public void removeGeneralName(int i)
398            {
399                synchronized (monitor())
400                {
401                    check_orphaned();
402                    get_store().remove_element(GENERALNAME$0, i);
403                }
404            }
405            
406            /**
407             * Gets array of all "gssExportedName" elements
408             */
409            public org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGssExportedNameType[] getGssExportedNameArray()
410            {
411                synchronized (monitor())
412                {
413                    check_orphaned();
414                    java.util.List targetList = new java.util.ArrayList();
415                    get_store().find_all_element_users(GSSEXPORTEDNAME$2, targetList);
416                    org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGssExportedNameType[] result = new org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGssExportedNameType[targetList.size()];
417                    targetList.toArray(result);
418                    return result;
419                }
420            }
421            
422            /**
423             * Gets ith "gssExportedName" element
424             */
425            public org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGssExportedNameType getGssExportedNameArray(int i)
426            {
427                synchronized (monitor())
428                {
429                    check_orphaned();
430                    org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGssExportedNameType target = null;
431                    target = (org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGssExportedNameType)get_store().find_element_user(GSSEXPORTEDNAME$2, i);
432                    if (target == null)
433                    {
434                        throw new IndexOutOfBoundsException();
435                    }
436                    return target;
437                }
438            }
439            
440            /**
441             * Returns number of "gssExportedName" element
442             */
443            public int sizeOfGssExportedNameArray()
444            {
445                synchronized (monitor())
446                {
447                    check_orphaned();
448                    return get_store().count_elements(GSSEXPORTEDNAME$2);
449                }
450            }
451            
452            /**
453             * Sets array of all "gssExportedName" element
454             */
455            public void setGssExportedNameArray(org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGssExportedNameType[] gssExportedNameArray)
456            {
457                synchronized (monitor())
458                {
459                    check_orphaned();
460                    arraySetterHelper(gssExportedNameArray, GSSEXPORTEDNAME$2);
461                }
462            }
463            
464            /**
465             * Sets ith "gssExportedName" element
466             */
467            public void setGssExportedNameArray(int i, org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGssExportedNameType gssExportedName)
468            {
469                synchronized (monitor())
470                {
471                    check_orphaned();
472                    org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGssExportedNameType target = null;
473                    target = (org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGssExportedNameType)get_store().find_element_user(GSSEXPORTEDNAME$2, i);
474                    if (target == null)
475                    {
476                        throw new IndexOutOfBoundsException();
477                    }
478                    target.set(gssExportedName);
479                }
480            }
481            
482            /**
483             * Inserts and returns a new empty value (as xml) as the ith "gssExportedName" element
484             */
485            public org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGssExportedNameType insertNewGssExportedName(int i)
486            {
487                synchronized (monitor())
488                {
489                    check_orphaned();
490                    org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGssExportedNameType target = null;
491                    target = (org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGssExportedNameType)get_store().insert_element_user(GSSEXPORTEDNAME$2, i);
492                    return target;
493                }
494            }
495            
496            /**
497             * Appends and returns a new empty value (as xml) as the last "gssExportedName" element
498             */
499            public org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGssExportedNameType addNewGssExportedName()
500            {
501                synchronized (monitor())
502                {
503                    check_orphaned();
504                    org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGssExportedNameType target = null;
505                    target = (org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGssExportedNameType)get_store().add_element_user(GSSEXPORTEDNAME$2);
506                    return target;
507                }
508            }
509            
510            /**
511             * Removes the ith "gssExportedName" element
512             */
513            public void removeGssExportedName(int i)
514            {
515                synchronized (monitor())
516                {
517                    check_orphaned();
518                    get_store().remove_element(GSSEXPORTEDNAME$2, i);
519                }
520            }
521            
522            /**
523             * Gets the "required" attribute
524             */
525            public boolean getRequired()
526            {
527                synchronized (monitor())
528                {
529                    check_orphaned();
530                    org.apache.xmlbeans.SimpleValue target = null;
531                    target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(REQUIRED$4);
532                    if (target == null)
533                    {
534                        target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(REQUIRED$4);
535                    }
536                    if (target == null)
537                    {
538                        return false;
539                    }
540                    return target.getBooleanValue();
541                }
542            }
543            
544            /**
545             * Gets (as xml) the "required" attribute
546             */
547            public org.apache.xmlbeans.XmlBoolean xgetRequired()
548            {
549                synchronized (monitor())
550                {
551                    check_orphaned();
552                    org.apache.xmlbeans.XmlBoolean target = null;
553                    target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(REQUIRED$4);
554                    if (target == null)
555                    {
556                        target = (org.apache.xmlbeans.XmlBoolean)get_default_attribute_value(REQUIRED$4);
557                    }
558                    return target;
559                }
560            }
561            
562            /**
563             * True if has "required" attribute
564             */
565            public boolean isSetRequired()
566            {
567                synchronized (monitor())
568                {
569                    check_orphaned();
570                    return get_store().find_attribute_user(REQUIRED$4) != null;
571                }
572            }
573            
574            /**
575             * Sets the "required" attribute
576             */
577            public void setRequired(boolean required)
578            {
579                synchronized (monitor())
580                {
581                    check_orphaned();
582                    org.apache.xmlbeans.SimpleValue target = null;
583                    target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(REQUIRED$4);
584                    if (target == null)
585                    {
586                        target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(REQUIRED$4);
587                    }
588                    target.setBooleanValue(required);
589                }
590            }
591            
592            /**
593             * Sets (as xml) the "required" attribute
594             */
595            public void xsetRequired(org.apache.xmlbeans.XmlBoolean required)
596            {
597                synchronized (monitor())
598                {
599                    check_orphaned();
600                    org.apache.xmlbeans.XmlBoolean target = null;
601                    target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(REQUIRED$4);
602                    if (target == null)
603                    {
604                        target = (org.apache.xmlbeans.XmlBoolean)get_store().add_attribute_user(REQUIRED$4);
605                    }
606                    target.set(required);
607                }
608            }
609            
610            /**
611             * Unsets the "required" attribute
612             */
613            public void unsetRequired()
614            {
615                synchronized (monitor())
616                {
617                    check_orphaned();
618                    get_store().remove_attribute(REQUIRED$4);
619                }
620            }
621        }
622    }