001    /*
002     * XML Type:  distinguishedNameType
003     * Namespace: http://geronimo.apache.org/xml/ns/security-2.0
004     * Java type: org.apache.geronimo.xbeans.geronimo.security.GerDistinguishedNameType
005     *
006     * Automatically generated - do not modify.
007     */
008    package org.apache.geronimo.xbeans.geronimo.security.impl;
009    /**
010     * An XML distinguishedNameType(@http://geronimo.apache.org/xml/ns/security-2.0).
011     *
012     * This is a complex type.
013     */
014    public class GerDistinguishedNameTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.geronimo.xbeans.geronimo.security.GerDistinguishedNameType
015    {
016        
017        public GerDistinguishedNameTypeImpl(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 NAME$2 = 
025            new javax.xml.namespace.QName("", "name");
026        
027        
028        /**
029         * Gets array of all "description" elements
030         */
031        public org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType[] getDescriptionArray()
032        {
033            synchronized (monitor())
034            {
035                check_orphaned();
036                java.util.List targetList = new java.util.ArrayList();
037                get_store().find_all_element_users(DESCRIPTION$0, targetList);
038                org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType[] result = new org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType[targetList.size()];
039                targetList.toArray(result);
040                return result;
041            }
042        }
043        
044        /**
045         * Gets ith "description" element
046         */
047        public org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType getDescriptionArray(int i)
048        {
049            synchronized (monitor())
050            {
051                check_orphaned();
052                org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType target = null;
053                target = (org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType)get_store().find_element_user(DESCRIPTION$0, i);
054                if (target == null)
055                {
056                    throw new IndexOutOfBoundsException();
057                }
058                return target;
059            }
060        }
061        
062        /**
063         * Returns number of "description" element
064         */
065        public int sizeOfDescriptionArray()
066        {
067            synchronized (monitor())
068            {
069                check_orphaned();
070                return get_store().count_elements(DESCRIPTION$0);
071            }
072        }
073        
074        /**
075         * Sets array of all "description" element
076         */
077        public void setDescriptionArray(org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType[] descriptionArray)
078        {
079            synchronized (monitor())
080            {
081                check_orphaned();
082                arraySetterHelper(descriptionArray, DESCRIPTION$0);
083            }
084        }
085        
086        /**
087         * Sets ith "description" element
088         */
089        public void setDescriptionArray(int i, org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType description)
090        {
091            synchronized (monitor())
092            {
093                check_orphaned();
094                org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType target = null;
095                target = (org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType)get_store().find_element_user(DESCRIPTION$0, i);
096                if (target == null)
097                {
098                    throw new IndexOutOfBoundsException();
099                }
100                target.set(description);
101            }
102        }
103        
104        /**
105         * Inserts and returns a new empty value (as xml) as the ith "description" element
106         */
107        public org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType insertNewDescription(int i)
108        {
109            synchronized (monitor())
110            {
111                check_orphaned();
112                org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType target = null;
113                target = (org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType)get_store().insert_element_user(DESCRIPTION$0, i);
114                return target;
115            }
116        }
117        
118        /**
119         * Appends and returns a new empty value (as xml) as the last "description" element
120         */
121        public org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType addNewDescription()
122        {
123            synchronized (monitor())
124            {
125                check_orphaned();
126                org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType target = null;
127                target = (org.apache.geronimo.xbeans.geronimo.security.GerDescriptionType)get_store().add_element_user(DESCRIPTION$0);
128                return target;
129            }
130        }
131        
132        /**
133         * Removes the ith "description" element
134         */
135        public void removeDescription(int i)
136        {
137            synchronized (monitor())
138            {
139                check_orphaned();
140                get_store().remove_element(DESCRIPTION$0, i);
141            }
142        }
143        
144        /**
145         * Gets the "name" attribute
146         */
147        public java.lang.String getName()
148        {
149            synchronized (monitor())
150            {
151                check_orphaned();
152                org.apache.xmlbeans.SimpleValue target = null;
153                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$2);
154                if (target == null)
155                {
156                    return null;
157                }
158                return target.getStringValue();
159            }
160        }
161        
162        /**
163         * Gets (as xml) the "name" attribute
164         */
165        public org.apache.xmlbeans.XmlString xgetName()
166        {
167            synchronized (monitor())
168            {
169                check_orphaned();
170                org.apache.xmlbeans.XmlString target = null;
171                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$2);
172                return target;
173            }
174        }
175        
176        /**
177         * Sets the "name" attribute
178         */
179        public void setName(java.lang.String name)
180        {
181            synchronized (monitor())
182            {
183                check_orphaned();
184                org.apache.xmlbeans.SimpleValue target = null;
185                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$2);
186                if (target == null)
187                {
188                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$2);
189                }
190                target.setStringValue(name);
191            }
192        }
193        
194        /**
195         * Sets (as xml) the "name" attribute
196         */
197        public void xsetName(org.apache.xmlbeans.XmlString name)
198        {
199            synchronized (monitor())
200            {
201                check_orphaned();
202                org.apache.xmlbeans.XmlString target = null;
203                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$2);
204                if (target == null)
205                {
206                    target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(NAME$2);
207                }
208                target.set(name);
209            }
210        }
211    }