001    /*
002     * XML Type:  principalType
003     * Namespace: http://geronimo.apache.org/xml/ns/security-2.0
004     * Java type: org.apache.geronimo.xbeans.geronimo.security.GerPrincipalType
005     *
006     * Automatically generated - do not modify.
007     */
008    package org.apache.geronimo.xbeans.geronimo.security.impl;
009    /**
010     * An XML principalType(@http://geronimo.apache.org/xml/ns/security-2.0).
011     *
012     * This is a complex type.
013     */
014    public class GerPrincipalTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.geronimo.xbeans.geronimo.security.GerPrincipalType
015    {
016        
017        public GerPrincipalTypeImpl(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://geronimo.apache.org/xml/ns/security-2.0", "description");
024        private static final javax.xml.namespace.QName CLASS1$2 = 
025            new javax.xml.namespace.QName("", "class");
026        private static final javax.xml.namespace.QName NAME$4 = 
027            new javax.xml.namespace.QName("", "name");
028        
029        
030        /**
031         * Gets array of all "description" elements
032         */
033        public org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType[] 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.xbeans.geronimo.security.GerDescriptionType[] result = new org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType[targetList.size()];
041                targetList.toArray(result);
042                return result;
043            }
044        }
045        
046        /**
047         * Gets ith "description" element
048         */
049        public org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType getDescriptionArray(int i)
050        {
051            synchronized (monitor())
052            {
053                check_orphaned();
054                org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType target = null;
055                target = (org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType)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.xbeans.geronimo.security.GerDescriptionType[] 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.xbeans.geronimo.security.GerDescriptionType description)
092        {
093            synchronized (monitor())
094            {
095                check_orphaned();
096                org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType target = null;
097                target = (org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType)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.xbeans.geronimo.security.GerDescriptionType insertNewDescription(int i)
110        {
111            synchronized (monitor())
112            {
113                check_orphaned();
114                org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType target = null;
115                target = (org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType)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.xbeans.geronimo.security.GerDescriptionType addNewDescription()
124        {
125            synchronized (monitor())
126            {
127                check_orphaned();
128                org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType target = null;
129                target = (org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType)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 "class" attribute
148         */
149        public java.lang.String getClass1()
150        {
151            synchronized (monitor())
152            {
153                check_orphaned();
154                org.apache.xmlbeans.SimpleValue target = null;
155                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CLASS1$2);
156                if (target == null)
157                {
158                    return null;
159                }
160                return target.getStringValue();
161            }
162        }
163        
164        /**
165         * Gets (as xml) the "class" attribute
166         */
167        public org.apache.xmlbeans.XmlString xgetClass1()
168        {
169            synchronized (monitor())
170            {
171                check_orphaned();
172                org.apache.xmlbeans.XmlString target = null;
173                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(CLASS1$2);
174                return target;
175            }
176        }
177        
178        /**
179         * Sets the "class" attribute
180         */
181        public void setClass1(java.lang.String class1)
182        {
183            synchronized (monitor())
184            {
185                check_orphaned();
186                org.apache.xmlbeans.SimpleValue target = null;
187                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CLASS1$2);
188                if (target == null)
189                {
190                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(CLASS1$2);
191                }
192                target.setStringValue(class1);
193            }
194        }
195        
196        /**
197         * Sets (as xml) the "class" attribute
198         */
199        public void xsetClass1(org.apache.xmlbeans.XmlString class1)
200        {
201            synchronized (monitor())
202            {
203                check_orphaned();
204                org.apache.xmlbeans.XmlString target = null;
205                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(CLASS1$2);
206                if (target == null)
207                {
208                    target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(CLASS1$2);
209                }
210                target.set(class1);
211            }
212        }
213        
214        /**
215         * Gets the "name" attribute
216         */
217        public java.lang.String getName()
218        {
219            synchronized (monitor())
220            {
221                check_orphaned();
222                org.apache.xmlbeans.SimpleValue target = null;
223                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$4);
224                if (target == null)
225                {
226                    return null;
227                }
228                return target.getStringValue();
229            }
230        }
231        
232        /**
233         * Gets (as xml) the "name" attribute
234         */
235        public org.apache.xmlbeans.XmlString xgetName()
236        {
237            synchronized (monitor())
238            {
239                check_orphaned();
240                org.apache.xmlbeans.XmlString target = null;
241                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$4);
242                return target;
243            }
244        }
245        
246        /**
247         * Sets the "name" attribute
248         */
249        public void setName(java.lang.String name)
250        {
251            synchronized (monitor())
252            {
253                check_orphaned();
254                org.apache.xmlbeans.SimpleValue target = null;
255                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$4);
256                if (target == null)
257                {
258                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$4);
259                }
260                target.setStringValue(name);
261            }
262        }
263        
264        /**
265         * Sets (as xml) the "name" attribute
266         */
267        public void xsetName(org.apache.xmlbeans.XmlString name)
268        {
269            synchronized (monitor())
270            {
271                check_orphaned();
272                org.apache.xmlbeans.XmlString target = null;
273                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$4);
274                if (target == null)
275                {
276                    target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(NAME$4);
277                }
278                target.set(name);
279            }
280        }
281    }