001    /*
002     * XML Type:  javabeanType
003     * Namespace: http://geronimo.apache.org/xml/ns/deployment/javabean-1.0
004     * Java type: org.apache.geronimo.deployment.javabean.xbeans.JavabeanType
005     *
006     * Automatically generated - do not modify.
007     */
008    package org.apache.geronimo.deployment.javabean.xbeans.impl;
009    /**
010     * An XML javabeanType(@http://geronimo.apache.org/xml/ns/deployment/javabean-1.0).
011     *
012     * This is a complex type.
013     */
014    public class JavabeanTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.geronimo.deployment.javabean.xbeans.JavabeanType
015    {
016        
017        public JavabeanTypeImpl(org.apache.xmlbeans.SchemaType sType)
018        {
019            super(sType);
020        }
021        
022        private static final javax.xml.namespace.QName PROPERTY$0 = 
023            new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/deployment/javabean-1.0", "property");
024        private static final javax.xml.namespace.QName BEANPROPERTY$2 = 
025            new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/deployment/javabean-1.0", "bean-property");
026        
027        
028        /**
029         * Gets array of all "property" elements
030         */
031        public org.apache.geronimo.deployment.javabean.xbeans.PropertyType[] getPropertyArray()
032        {
033            synchronized (monitor())
034            {
035                check_orphaned();
036                java.util.List targetList = new java.util.ArrayList();
037                get_store().find_all_element_users(PROPERTY$0, targetList);
038                org.apache.geronimo.deployment.javabean.xbeans.PropertyType[] result = new org.apache.geronimo.deployment.javabean.xbeans.PropertyType[targetList.size()];
039                targetList.toArray(result);
040                return result;
041            }
042        }
043        
044        /**
045         * Gets ith "property" element
046         */
047        public org.apache.geronimo.deployment.javabean.xbeans.PropertyType getPropertyArray(int i)
048        {
049            synchronized (monitor())
050            {
051                check_orphaned();
052                org.apache.geronimo.deployment.javabean.xbeans.PropertyType target = null;
053                target = (org.apache.geronimo.deployment.javabean.xbeans.PropertyType)get_store().find_element_user(PROPERTY$0, i);
054                if (target == null)
055                {
056                    throw new IndexOutOfBoundsException();
057                }
058                return target;
059            }
060        }
061        
062        /**
063         * Returns number of "property" element
064         */
065        public int sizeOfPropertyArray()
066        {
067            synchronized (monitor())
068            {
069                check_orphaned();
070                return get_store().count_elements(PROPERTY$0);
071            }
072        }
073        
074        /**
075         * Sets array of all "property" element
076         */
077        public void setPropertyArray(org.apache.geronimo.deployment.javabean.xbeans.PropertyType[] propertyArray)
078        {
079            synchronized (monitor())
080            {
081                check_orphaned();
082                arraySetterHelper(propertyArray, PROPERTY$0);
083            }
084        }
085        
086        /**
087         * Sets ith "property" element
088         */
089        public void setPropertyArray(int i, org.apache.geronimo.deployment.javabean.xbeans.PropertyType property)
090        {
091            synchronized (monitor())
092            {
093                check_orphaned();
094                org.apache.geronimo.deployment.javabean.xbeans.PropertyType target = null;
095                target = (org.apache.geronimo.deployment.javabean.xbeans.PropertyType)get_store().find_element_user(PROPERTY$0, i);
096                if (target == null)
097                {
098                    throw new IndexOutOfBoundsException();
099                }
100                target.set(property);
101            }
102        }
103        
104        /**
105         * Inserts and returns a new empty value (as xml) as the ith "property" element
106         */
107        public org.apache.geronimo.deployment.javabean.xbeans.PropertyType insertNewProperty(int i)
108        {
109            synchronized (monitor())
110            {
111                check_orphaned();
112                org.apache.geronimo.deployment.javabean.xbeans.PropertyType target = null;
113                target = (org.apache.geronimo.deployment.javabean.xbeans.PropertyType)get_store().insert_element_user(PROPERTY$0, i);
114                return target;
115            }
116        }
117        
118        /**
119         * Appends and returns a new empty value (as xml) as the last "property" element
120         */
121        public org.apache.geronimo.deployment.javabean.xbeans.PropertyType addNewProperty()
122        {
123            synchronized (monitor())
124            {
125                check_orphaned();
126                org.apache.geronimo.deployment.javabean.xbeans.PropertyType target = null;
127                target = (org.apache.geronimo.deployment.javabean.xbeans.PropertyType)get_store().add_element_user(PROPERTY$0);
128                return target;
129            }
130        }
131        
132        /**
133         * Removes the ith "property" element
134         */
135        public void removeProperty(int i)
136        {
137            synchronized (monitor())
138            {
139                check_orphaned();
140                get_store().remove_element(PROPERTY$0, i);
141            }
142        }
143        
144        /**
145         * Gets array of all "bean-property" elements
146         */
147        public org.apache.geronimo.deployment.javabean.xbeans.BeanPropertyType[] getBeanPropertyArray()
148        {
149            synchronized (monitor())
150            {
151                check_orphaned();
152                java.util.List targetList = new java.util.ArrayList();
153                get_store().find_all_element_users(BEANPROPERTY$2, targetList);
154                org.apache.geronimo.deployment.javabean.xbeans.BeanPropertyType[] result = new org.apache.geronimo.deployment.javabean.xbeans.BeanPropertyType[targetList.size()];
155                targetList.toArray(result);
156                return result;
157            }
158        }
159        
160        /**
161         * Gets ith "bean-property" element
162         */
163        public org.apache.geronimo.deployment.javabean.xbeans.BeanPropertyType getBeanPropertyArray(int i)
164        {
165            synchronized (monitor())
166            {
167                check_orphaned();
168                org.apache.geronimo.deployment.javabean.xbeans.BeanPropertyType target = null;
169                target = (org.apache.geronimo.deployment.javabean.xbeans.BeanPropertyType)get_store().find_element_user(BEANPROPERTY$2, i);
170                if (target == null)
171                {
172                    throw new IndexOutOfBoundsException();
173                }
174                return target;
175            }
176        }
177        
178        /**
179         * Returns number of "bean-property" element
180         */
181        public int sizeOfBeanPropertyArray()
182        {
183            synchronized (monitor())
184            {
185                check_orphaned();
186                return get_store().count_elements(BEANPROPERTY$2);
187            }
188        }
189        
190        /**
191         * Sets array of all "bean-property" element
192         */
193        public void setBeanPropertyArray(org.apache.geronimo.deployment.javabean.xbeans.BeanPropertyType[] beanPropertyArray)
194        {
195            synchronized (monitor())
196            {
197                check_orphaned();
198                arraySetterHelper(beanPropertyArray, BEANPROPERTY$2);
199            }
200        }
201        
202        /**
203         * Sets ith "bean-property" element
204         */
205        public void setBeanPropertyArray(int i, org.apache.geronimo.deployment.javabean.xbeans.BeanPropertyType beanProperty)
206        {
207            synchronized (monitor())
208            {
209                check_orphaned();
210                org.apache.geronimo.deployment.javabean.xbeans.BeanPropertyType target = null;
211                target = (org.apache.geronimo.deployment.javabean.xbeans.BeanPropertyType)get_store().find_element_user(BEANPROPERTY$2, i);
212                if (target == null)
213                {
214                    throw new IndexOutOfBoundsException();
215                }
216                target.set(beanProperty);
217            }
218        }
219        
220        /**
221         * Inserts and returns a new empty value (as xml) as the ith "bean-property" element
222         */
223        public org.apache.geronimo.deployment.javabean.xbeans.BeanPropertyType insertNewBeanProperty(int i)
224        {
225            synchronized (monitor())
226            {
227                check_orphaned();
228                org.apache.geronimo.deployment.javabean.xbeans.BeanPropertyType target = null;
229                target = (org.apache.geronimo.deployment.javabean.xbeans.BeanPropertyType)get_store().insert_element_user(BEANPROPERTY$2, i);
230                return target;
231            }
232        }
233        
234        /**
235         * Appends and returns a new empty value (as xml) as the last "bean-property" element
236         */
237        public org.apache.geronimo.deployment.javabean.xbeans.BeanPropertyType addNewBeanProperty()
238        {
239            synchronized (monitor())
240            {
241                check_orphaned();
242                org.apache.geronimo.deployment.javabean.xbeans.BeanPropertyType target = null;
243                target = (org.apache.geronimo.deployment.javabean.xbeans.BeanPropertyType)get_store().add_element_user(BEANPROPERTY$2);
244                return target;
245            }
246        }
247        
248        /**
249         * Removes the ith "bean-property" element
250         */
251        public void removeBeanProperty(int i)
252        {
253            synchronized (monitor())
254            {
255                check_orphaned();
256                get_store().remove_element(BEANPROPERTY$2, i);
257            }
258        }
259    }