001 /*
002 * XML Type: service-refType
003 * Namespace: http://geronimo.apache.org/xml/ns/naming-1.2
004 * Java type: org.apache.geronimo.xbeans.geronimo.naming.GerServiceRefType
005 *
006 * Automatically generated - do not modify.
007 */
008 package org.apache.geronimo.xbeans.geronimo.naming.impl;
009 /**
010 * An XML service-refType(@http://geronimo.apache.org/xml/ns/naming-1.2).
011 *
012 * This is a complex type.
013 */
014 public class GerServiceRefTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.geronimo.xbeans.geronimo.naming.GerServiceRefType
015 {
016
017 public GerServiceRefTypeImpl(org.apache.xmlbeans.SchemaType sType)
018 {
019 super(sType);
020 }
021
022 private static final javax.xml.namespace.QName SERVICEREFNAME$0 =
023 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/naming-1.2", "service-ref-name");
024 private static final javax.xml.namespace.QName SERVICECOMPLETION$2 =
025 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/naming-1.2", "service-completion");
026 private static final javax.xml.namespace.QName PORT$4 =
027 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/naming-1.2", "port");
028
029
030 /**
031 * Gets the "service-ref-name" element
032 */
033 public java.lang.String getServiceRefName()
034 {
035 synchronized (monitor())
036 {
037 check_orphaned();
038 org.apache.xmlbeans.SimpleValue target = null;
039 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SERVICEREFNAME$0, 0);
040 if (target == null)
041 {
042 return null;
043 }
044 return target.getStringValue();
045 }
046 }
047
048 /**
049 * Gets (as xml) the "service-ref-name" element
050 */
051 public org.apache.xmlbeans.XmlString xgetServiceRefName()
052 {
053 synchronized (monitor())
054 {
055 check_orphaned();
056 org.apache.xmlbeans.XmlString target = null;
057 target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(SERVICEREFNAME$0, 0);
058 return target;
059 }
060 }
061
062 /**
063 * Sets the "service-ref-name" element
064 */
065 public void setServiceRefName(java.lang.String serviceRefName)
066 {
067 synchronized (monitor())
068 {
069 check_orphaned();
070 org.apache.xmlbeans.SimpleValue target = null;
071 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SERVICEREFNAME$0, 0);
072 if (target == null)
073 {
074 target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SERVICEREFNAME$0);
075 }
076 target.setStringValue(serviceRefName);
077 }
078 }
079
080 /**
081 * Sets (as xml) the "service-ref-name" element
082 */
083 public void xsetServiceRefName(org.apache.xmlbeans.XmlString serviceRefName)
084 {
085 synchronized (monitor())
086 {
087 check_orphaned();
088 org.apache.xmlbeans.XmlString target = null;
089 target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(SERVICEREFNAME$0, 0);
090 if (target == null)
091 {
092 target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(SERVICEREFNAME$0);
093 }
094 target.set(serviceRefName);
095 }
096 }
097
098 /**
099 * Gets the "service-completion" element
100 */
101 public org.apache.geronimo.xbeans.geronimo.naming.GerServiceCompletionType getServiceCompletion()
102 {
103 synchronized (monitor())
104 {
105 check_orphaned();
106 org.apache.geronimo.xbeans.geronimo.naming.GerServiceCompletionType target = null;
107 target = (org.apache.geronimo.xbeans.geronimo.naming.GerServiceCompletionType)get_store().find_element_user(SERVICECOMPLETION$2, 0);
108 if (target == null)
109 {
110 return null;
111 }
112 return target;
113 }
114 }
115
116 /**
117 * True if has "service-completion" element
118 */
119 public boolean isSetServiceCompletion()
120 {
121 synchronized (monitor())
122 {
123 check_orphaned();
124 return get_store().count_elements(SERVICECOMPLETION$2) != 0;
125 }
126 }
127
128 /**
129 * Sets the "service-completion" element
130 */
131 public void setServiceCompletion(org.apache.geronimo.xbeans.geronimo.naming.GerServiceCompletionType serviceCompletion)
132 {
133 synchronized (monitor())
134 {
135 check_orphaned();
136 org.apache.geronimo.xbeans.geronimo.naming.GerServiceCompletionType target = null;
137 target = (org.apache.geronimo.xbeans.geronimo.naming.GerServiceCompletionType)get_store().find_element_user(SERVICECOMPLETION$2, 0);
138 if (target == null)
139 {
140 target = (org.apache.geronimo.xbeans.geronimo.naming.GerServiceCompletionType)get_store().add_element_user(SERVICECOMPLETION$2);
141 }
142 target.set(serviceCompletion);
143 }
144 }
145
146 /**
147 * Appends and returns a new empty "service-completion" element
148 */
149 public org.apache.geronimo.xbeans.geronimo.naming.GerServiceCompletionType addNewServiceCompletion()
150 {
151 synchronized (monitor())
152 {
153 check_orphaned();
154 org.apache.geronimo.xbeans.geronimo.naming.GerServiceCompletionType target = null;
155 target = (org.apache.geronimo.xbeans.geronimo.naming.GerServiceCompletionType)get_store().add_element_user(SERVICECOMPLETION$2);
156 return target;
157 }
158 }
159
160 /**
161 * Unsets the "service-completion" element
162 */
163 public void unsetServiceCompletion()
164 {
165 synchronized (monitor())
166 {
167 check_orphaned();
168 get_store().remove_element(SERVICECOMPLETION$2, 0);
169 }
170 }
171
172 /**
173 * Gets array of all "port" elements
174 */
175 public org.apache.geronimo.xbeans.geronimo.naming.GerPortType[] getPortArray()
176 {
177 synchronized (monitor())
178 {
179 check_orphaned();
180 java.util.List targetList = new java.util.ArrayList();
181 get_store().find_all_element_users(PORT$4, targetList);
182 org.apache.geronimo.xbeans.geronimo.naming.GerPortType[] result = new org.apache.geronimo.xbeans.geronimo.naming.GerPortType[targetList.size()];
183 targetList.toArray(result);
184 return result;
185 }
186 }
187
188 /**
189 * Gets ith "port" element
190 */
191 public org.apache.geronimo.xbeans.geronimo.naming.GerPortType getPortArray(int i)
192 {
193 synchronized (monitor())
194 {
195 check_orphaned();
196 org.apache.geronimo.xbeans.geronimo.naming.GerPortType target = null;
197 target = (org.apache.geronimo.xbeans.geronimo.naming.GerPortType)get_store().find_element_user(PORT$4, i);
198 if (target == null)
199 {
200 throw new IndexOutOfBoundsException();
201 }
202 return target;
203 }
204 }
205
206 /**
207 * Returns number of "port" element
208 */
209 public int sizeOfPortArray()
210 {
211 synchronized (monitor())
212 {
213 check_orphaned();
214 return get_store().count_elements(PORT$4);
215 }
216 }
217
218 /**
219 * Sets array of all "port" element
220 */
221 public void setPortArray(org.apache.geronimo.xbeans.geronimo.naming.GerPortType[] portArray)
222 {
223 synchronized (monitor())
224 {
225 check_orphaned();
226 arraySetterHelper(portArray, PORT$4);
227 }
228 }
229
230 /**
231 * Sets ith "port" element
232 */
233 public void setPortArray(int i, org.apache.geronimo.xbeans.geronimo.naming.GerPortType port)
234 {
235 synchronized (monitor())
236 {
237 check_orphaned();
238 org.apache.geronimo.xbeans.geronimo.naming.GerPortType target = null;
239 target = (org.apache.geronimo.xbeans.geronimo.naming.GerPortType)get_store().find_element_user(PORT$4, i);
240 if (target == null)
241 {
242 throw new IndexOutOfBoundsException();
243 }
244 target.set(port);
245 }
246 }
247
248 /**
249 * Inserts and returns a new empty value (as xml) as the ith "port" element
250 */
251 public org.apache.geronimo.xbeans.geronimo.naming.GerPortType insertNewPort(int i)
252 {
253 synchronized (monitor())
254 {
255 check_orphaned();
256 org.apache.geronimo.xbeans.geronimo.naming.GerPortType target = null;
257 target = (org.apache.geronimo.xbeans.geronimo.naming.GerPortType)get_store().insert_element_user(PORT$4, i);
258 return target;
259 }
260 }
261
262 /**
263 * Appends and returns a new empty value (as xml) as the last "port" element
264 */
265 public org.apache.geronimo.xbeans.geronimo.naming.GerPortType addNewPort()
266 {
267 synchronized (monitor())
268 {
269 check_orphaned();
270 org.apache.geronimo.xbeans.geronimo.naming.GerPortType target = null;
271 target = (org.apache.geronimo.xbeans.geronimo.naming.GerPortType)get_store().add_element_user(PORT$4);
272 return target;
273 }
274 }
275
276 /**
277 * Removes the ith "port" element
278 */
279 public void removePort(int i)
280 {
281 synchronized (monitor())
282 {
283 check_orphaned();
284 get_store().remove_element(PORT$4, i);
285 }
286 }
287 }