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