001    /*
002     * XML Type:  tMessage
003     * Namespace: http://schemas.xmlsoap.org/wsdl/
004     * Java type: org.apache.geronimo.xbeans.wsdl.TMessage
005     *
006     * Automatically generated - do not modify.
007     */
008    package org.apache.geronimo.xbeans.wsdl.impl;
009    /**
010     * An XML tMessage(@http://schemas.xmlsoap.org/wsdl/).
011     *
012     * This is a complex type.
013     */
014    public class TMessageImpl extends org.apache.geronimo.xbeans.wsdl.impl.TExtensibleDocumentedImpl implements org.apache.geronimo.xbeans.wsdl.TMessage
015    {
016        
017        public TMessageImpl(org.apache.xmlbeans.SchemaType sType)
018        {
019            super(sType);
020        }
021        
022        private static final javax.xml.namespace.QName PART$0 = 
023            new javax.xml.namespace.QName("http://schemas.xmlsoap.org/wsdl/", "part");
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 "part" elements
030         */
031        public org.apache.geronimo.xbeans.wsdl.TPart[] getPartArray()
032        {
033            synchronized (monitor())
034            {
035                check_orphaned();
036                java.util.List targetList = new java.util.ArrayList();
037                get_store().find_all_element_users(PART$0, targetList);
038                org.apache.geronimo.xbeans.wsdl.TPart[] result = new org.apache.geronimo.xbeans.wsdl.TPart[targetList.size()];
039                targetList.toArray(result);
040                return result;
041            }
042        }
043        
044        /**
045         * Gets ith "part" element
046         */
047        public org.apache.geronimo.xbeans.wsdl.TPart getPartArray(int i)
048        {
049            synchronized (monitor())
050            {
051                check_orphaned();
052                org.apache.geronimo.xbeans.wsdl.TPart target = null;
053                target = (org.apache.geronimo.xbeans.wsdl.TPart)get_store().find_element_user(PART$0, i);
054                if (target == null)
055                {
056                    throw new IndexOutOfBoundsException();
057                }
058                return target;
059            }
060        }
061        
062        /**
063         * Returns number of "part" element
064         */
065        public int sizeOfPartArray()
066        {
067            synchronized (monitor())
068            {
069                check_orphaned();
070                return get_store().count_elements(PART$0);
071            }
072        }
073        
074        /**
075         * Sets array of all "part" element
076         */
077        public void setPartArray(org.apache.geronimo.xbeans.wsdl.TPart[] partArray)
078        {
079            synchronized (monitor())
080            {
081                check_orphaned();
082                arraySetterHelper(partArray, PART$0);
083            }
084        }
085        
086        /**
087         * Sets ith "part" element
088         */
089        public void setPartArray(int i, org.apache.geronimo.xbeans.wsdl.TPart part)
090        {
091            synchronized (monitor())
092            {
093                check_orphaned();
094                org.apache.geronimo.xbeans.wsdl.TPart target = null;
095                target = (org.apache.geronimo.xbeans.wsdl.TPart)get_store().find_element_user(PART$0, i);
096                if (target == null)
097                {
098                    throw new IndexOutOfBoundsException();
099                }
100                target.set(part);
101            }
102        }
103        
104        /**
105         * Inserts and returns a new empty value (as xml) as the ith "part" element
106         */
107        public org.apache.geronimo.xbeans.wsdl.TPart insertNewPart(int i)
108        {
109            synchronized (monitor())
110            {
111                check_orphaned();
112                org.apache.geronimo.xbeans.wsdl.TPart target = null;
113                target = (org.apache.geronimo.xbeans.wsdl.TPart)get_store().insert_element_user(PART$0, i);
114                return target;
115            }
116        }
117        
118        /**
119         * Appends and returns a new empty value (as xml) as the last "part" element
120         */
121        public org.apache.geronimo.xbeans.wsdl.TPart addNewPart()
122        {
123            synchronized (monitor())
124            {
125                check_orphaned();
126                org.apache.geronimo.xbeans.wsdl.TPart target = null;
127                target = (org.apache.geronimo.xbeans.wsdl.TPart)get_store().add_element_user(PART$0);
128                return target;
129            }
130        }
131        
132        /**
133         * Removes the ith "part" element
134         */
135        public void removePart(int i)
136        {
137            synchronized (monitor())
138            {
139                check_orphaned();
140                get_store().remove_element(PART$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.XmlNCName xgetName()
166        {
167            synchronized (monitor())
168            {
169                check_orphaned();
170                org.apache.xmlbeans.XmlNCName target = null;
171                target = (org.apache.xmlbeans.XmlNCName)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.XmlNCName name)
198        {
199            synchronized (monitor())
200            {
201                check_orphaned();
202                org.apache.xmlbeans.XmlNCName target = null;
203                target = (org.apache.xmlbeans.XmlNCName)get_store().find_attribute_user(NAME$2);
204                if (target == null)
205                {
206                    target = (org.apache.xmlbeans.XmlNCName)get_store().add_attribute_user(NAME$2);
207                }
208                target.set(name);
209            }
210        }
211    }