001 /*
002 * XML Type: applicationType
003 * Namespace: http://geronimo.apache.org/xml/ns/j2ee/application-2.0
004 * Java type: org.apache.geronimo.xbeans.geronimo.j2ee.GerApplicationType
005 *
006 * Automatically generated - do not modify.
007 */
008 package org.apache.geronimo.xbeans.geronimo.j2ee.impl;
009 /**
010 * An XML applicationType(@http://geronimo.apache.org/xml/ns/j2ee/application-2.0).
011 *
012 * This is a complex type.
013 */
014 public class GerApplicationTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.geronimo.xbeans.geronimo.j2ee.GerApplicationType
015 {
016
017 public GerApplicationTypeImpl(org.apache.xmlbeans.SchemaType sType)
018 {
019 super(sType);
020 }
021
022 private static final javax.xml.namespace.QName ENVIRONMENT$0 =
023 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/deployment-1.2", "environment");
024 private static final javax.xml.namespace.QName MODULE$2 =
025 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/j2ee/application-2.0", "module");
026 private static final javax.xml.namespace.QName EXTMODULE$4 =
027 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/j2ee/application-2.0", "ext-module");
028 private static final javax.xml.namespace.QName SECURITY$6 =
029 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/j2ee/application-2.0", "security");
030 private static final javax.xml.namespace.QName SERVICE$8 =
031 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/deployment-1.2", "service");
032 private static final org.apache.xmlbeans.QNameSet SERVICE$9 = org.apache.xmlbeans.QNameSet.forArray( new javax.xml.namespace.QName[] {
033 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/deployment-1.2", "service"),
034 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/deployment-1.2", "gbean"),
035 });
036 private static final javax.xml.namespace.QName APPLICATIONNAME$10 =
037 new javax.xml.namespace.QName("", "application-name");
038
039
040 /**
041 * Gets the "environment" element
042 */
043 public org.apache.geronimo.deployment.xbeans.EnvironmentType getEnvironment()
044 {
045 synchronized (monitor())
046 {
047 check_orphaned();
048 org.apache.geronimo.deployment.xbeans.EnvironmentType target = null;
049 target = (org.apache.geronimo.deployment.xbeans.EnvironmentType)get_store().find_element_user(ENVIRONMENT$0, 0);
050 if (target == null)
051 {
052 return null;
053 }
054 return target;
055 }
056 }
057
058 /**
059 * Sets the "environment" element
060 */
061 public void setEnvironment(org.apache.geronimo.deployment.xbeans.EnvironmentType environment)
062 {
063 synchronized (monitor())
064 {
065 check_orphaned();
066 org.apache.geronimo.deployment.xbeans.EnvironmentType target = null;
067 target = (org.apache.geronimo.deployment.xbeans.EnvironmentType)get_store().find_element_user(ENVIRONMENT$0, 0);
068 if (target == null)
069 {
070 target = (org.apache.geronimo.deployment.xbeans.EnvironmentType)get_store().add_element_user(ENVIRONMENT$0);
071 }
072 target.set(environment);
073 }
074 }
075
076 /**
077 * Appends and returns a new empty "environment" element
078 */
079 public org.apache.geronimo.deployment.xbeans.EnvironmentType addNewEnvironment()
080 {
081 synchronized (monitor())
082 {
083 check_orphaned();
084 org.apache.geronimo.deployment.xbeans.EnvironmentType target = null;
085 target = (org.apache.geronimo.deployment.xbeans.EnvironmentType)get_store().add_element_user(ENVIRONMENT$0);
086 return target;
087 }
088 }
089
090 /**
091 * Gets array of all "module" elements
092 */
093 public org.apache.geronimo.xbeans.geronimo.j2ee.GerModuleType[] getModuleArray()
094 {
095 synchronized (monitor())
096 {
097 check_orphaned();
098 java.util.List targetList = new java.util.ArrayList();
099 get_store().find_all_element_users(MODULE$2, targetList);
100 org.apache.geronimo.xbeans.geronimo.j2ee.GerModuleType[] result = new org.apache.geronimo.xbeans.geronimo.j2ee.GerModuleType[targetList.size()];
101 targetList.toArray(result);
102 return result;
103 }
104 }
105
106 /**
107 * Gets ith "module" element
108 */
109 public org.apache.geronimo.xbeans.geronimo.j2ee.GerModuleType getModuleArray(int i)
110 {
111 synchronized (monitor())
112 {
113 check_orphaned();
114 org.apache.geronimo.xbeans.geronimo.j2ee.GerModuleType target = null;
115 target = (org.apache.geronimo.xbeans.geronimo.j2ee.GerModuleType)get_store().find_element_user(MODULE$2, i);
116 if (target == null)
117 {
118 throw new IndexOutOfBoundsException();
119 }
120 return target;
121 }
122 }
123
124 /**
125 * Returns number of "module" element
126 */
127 public int sizeOfModuleArray()
128 {
129 synchronized (monitor())
130 {
131 check_orphaned();
132 return get_store().count_elements(MODULE$2);
133 }
134 }
135
136 /**
137 * Sets array of all "module" element
138 */
139 public void setModuleArray(org.apache.geronimo.xbeans.geronimo.j2ee.GerModuleType[] moduleArray)
140 {
141 synchronized (monitor())
142 {
143 check_orphaned();
144 arraySetterHelper(moduleArray, MODULE$2);
145 }
146 }
147
148 /**
149 * Sets ith "module" element
150 */
151 public void setModuleArray(int i, org.apache.geronimo.xbeans.geronimo.j2ee.GerModuleType module)
152 {
153 synchronized (monitor())
154 {
155 check_orphaned();
156 org.apache.geronimo.xbeans.geronimo.j2ee.GerModuleType target = null;
157 target = (org.apache.geronimo.xbeans.geronimo.j2ee.GerModuleType)get_store().find_element_user(MODULE$2, i);
158 if (target == null)
159 {
160 throw new IndexOutOfBoundsException();
161 }
162 target.set(module);
163 }
164 }
165
166 /**
167 * Inserts and returns a new empty value (as xml) as the ith "module" element
168 */
169 public org.apache.geronimo.xbeans.geronimo.j2ee.GerModuleType insertNewModule(int i)
170 {
171 synchronized (monitor())
172 {
173 check_orphaned();
174 org.apache.geronimo.xbeans.geronimo.j2ee.GerModuleType target = null;
175 target = (org.apache.geronimo.xbeans.geronimo.j2ee.GerModuleType)get_store().insert_element_user(MODULE$2, i);
176 return target;
177 }
178 }
179
180 /**
181 * Appends and returns a new empty value (as xml) as the last "module" element
182 */
183 public org.apache.geronimo.xbeans.geronimo.j2ee.GerModuleType addNewModule()
184 {
185 synchronized (monitor())
186 {
187 check_orphaned();
188 org.apache.geronimo.xbeans.geronimo.j2ee.GerModuleType target = null;
189 target = (org.apache.geronimo.xbeans.geronimo.j2ee.GerModuleType)get_store().add_element_user(MODULE$2);
190 return target;
191 }
192 }
193
194 /**
195 * Removes the ith "module" element
196 */
197 public void removeModule(int i)
198 {
199 synchronized (monitor())
200 {
201 check_orphaned();
202 get_store().remove_element(MODULE$2, i);
203 }
204 }
205
206 /**
207 * Gets array of all "ext-module" elements
208 */
209 public org.apache.geronimo.xbeans.geronimo.j2ee.GerExtModuleType[] getExtModuleArray()
210 {
211 synchronized (monitor())
212 {
213 check_orphaned();
214 java.util.List targetList = new java.util.ArrayList();
215 get_store().find_all_element_users(EXTMODULE$4, targetList);
216 org.apache.geronimo.xbeans.geronimo.j2ee.GerExtModuleType[] result = new org.apache.geronimo.xbeans.geronimo.j2ee.GerExtModuleType[targetList.size()];
217 targetList.toArray(result);
218 return result;
219 }
220 }
221
222 /**
223 * Gets ith "ext-module" element
224 */
225 public org.apache.geronimo.xbeans.geronimo.j2ee.GerExtModuleType getExtModuleArray(int i)
226 {
227 synchronized (monitor())
228 {
229 check_orphaned();
230 org.apache.geronimo.xbeans.geronimo.j2ee.GerExtModuleType target = null;
231 target = (org.apache.geronimo.xbeans.geronimo.j2ee.GerExtModuleType)get_store().find_element_user(EXTMODULE$4, i);
232 if (target == null)
233 {
234 throw new IndexOutOfBoundsException();
235 }
236 return target;
237 }
238 }
239
240 /**
241 * Returns number of "ext-module" element
242 */
243 public int sizeOfExtModuleArray()
244 {
245 synchronized (monitor())
246 {
247 check_orphaned();
248 return get_store().count_elements(EXTMODULE$4);
249 }
250 }
251
252 /**
253 * Sets array of all "ext-module" element
254 */
255 public void setExtModuleArray(org.apache.geronimo.xbeans.geronimo.j2ee.GerExtModuleType[] extModuleArray)
256 {
257 synchronized (monitor())
258 {
259 check_orphaned();
260 arraySetterHelper(extModuleArray, EXTMODULE$4);
261 }
262 }
263
264 /**
265 * Sets ith "ext-module" element
266 */
267 public void setExtModuleArray(int i, org.apache.geronimo.xbeans.geronimo.j2ee.GerExtModuleType extModule)
268 {
269 synchronized (monitor())
270 {
271 check_orphaned();
272 org.apache.geronimo.xbeans.geronimo.j2ee.GerExtModuleType target = null;
273 target = (org.apache.geronimo.xbeans.geronimo.j2ee.GerExtModuleType)get_store().find_element_user(EXTMODULE$4, i);
274 if (target == null)
275 {
276 throw new IndexOutOfBoundsException();
277 }
278 target.set(extModule);
279 }
280 }
281
282 /**
283 * Inserts and returns a new empty value (as xml) as the ith "ext-module" element
284 */
285 public org.apache.geronimo.xbeans.geronimo.j2ee.GerExtModuleType insertNewExtModule(int i)
286 {
287 synchronized (monitor())
288 {
289 check_orphaned();
290 org.apache.geronimo.xbeans.geronimo.j2ee.GerExtModuleType target = null;
291 target = (org.apache.geronimo.xbeans.geronimo.j2ee.GerExtModuleType)get_store().insert_element_user(EXTMODULE$4, i);
292 return target;
293 }
294 }
295
296 /**
297 * Appends and returns a new empty value (as xml) as the last "ext-module" element
298 */
299 public org.apache.geronimo.xbeans.geronimo.j2ee.GerExtModuleType addNewExtModule()
300 {
301 synchronized (monitor())
302 {
303 check_orphaned();
304 org.apache.geronimo.xbeans.geronimo.j2ee.GerExtModuleType target = null;
305 target = (org.apache.geronimo.xbeans.geronimo.j2ee.GerExtModuleType)get_store().add_element_user(EXTMODULE$4);
306 return target;
307 }
308 }
309
310 /**
311 * Removes the ith "ext-module" element
312 */
313 public void removeExtModule(int i)
314 {
315 synchronized (monitor())
316 {
317 check_orphaned();
318 get_store().remove_element(EXTMODULE$4, i);
319 }
320 }
321
322 /**
323 * Gets the "security" element
324 */
325 public org.apache.geronimo.xbeans.geronimo.j2ee.GerAbstractSecurityType getSecurity()
326 {
327 synchronized (monitor())
328 {
329 check_orphaned();
330 org.apache.geronimo.xbeans.geronimo.j2ee.GerAbstractSecurityType target = null;
331 target = (org.apache.geronimo.xbeans.geronimo.j2ee.GerAbstractSecurityType)get_store().find_element_user(SECURITY$6, 0);
332 if (target == null)
333 {
334 return null;
335 }
336 return target;
337 }
338 }
339
340 /**
341 * True if has "security" element
342 */
343 public boolean isSetSecurity()
344 {
345 synchronized (monitor())
346 {
347 check_orphaned();
348 return get_store().count_elements(SECURITY$6) != 0;
349 }
350 }
351
352 /**
353 * Sets the "security" element
354 */
355 public void setSecurity(org.apache.geronimo.xbeans.geronimo.j2ee.GerAbstractSecurityType security)
356 {
357 synchronized (monitor())
358 {
359 check_orphaned();
360 org.apache.geronimo.xbeans.geronimo.j2ee.GerAbstractSecurityType target = null;
361 target = (org.apache.geronimo.xbeans.geronimo.j2ee.GerAbstractSecurityType)get_store().find_element_user(SECURITY$6, 0);
362 if (target == null)
363 {
364 target = (org.apache.geronimo.xbeans.geronimo.j2ee.GerAbstractSecurityType)get_store().add_element_user(SECURITY$6);
365 }
366 target.set(security);
367 }
368 }
369
370 /**
371 * Appends and returns a new empty "security" element
372 */
373 public org.apache.geronimo.xbeans.geronimo.j2ee.GerAbstractSecurityType addNewSecurity()
374 {
375 synchronized (monitor())
376 {
377 check_orphaned();
378 org.apache.geronimo.xbeans.geronimo.j2ee.GerAbstractSecurityType target = null;
379 target = (org.apache.geronimo.xbeans.geronimo.j2ee.GerAbstractSecurityType)get_store().add_element_user(SECURITY$6);
380 return target;
381 }
382 }
383
384 /**
385 * Unsets the "security" element
386 */
387 public void unsetSecurity()
388 {
389 synchronized (monitor())
390 {
391 check_orphaned();
392 get_store().remove_element(SECURITY$6, 0);
393 }
394 }
395
396 /**
397 * Gets array of all "service" elements
398 */
399 public org.apache.geronimo.deployment.xbeans.AbstractServiceType[] getServiceArray()
400 {
401 synchronized (monitor())
402 {
403 check_orphaned();
404 java.util.List targetList = new java.util.ArrayList();
405 get_store().find_all_element_users(SERVICE$9, targetList);
406 org.apache.geronimo.deployment.xbeans.AbstractServiceType[] result = new org.apache.geronimo.deployment.xbeans.AbstractServiceType[targetList.size()];
407 targetList.toArray(result);
408 return result;
409 }
410 }
411
412 /**
413 * Gets ith "service" element
414 */
415 public org.apache.geronimo.deployment.xbeans.AbstractServiceType getServiceArray(int i)
416 {
417 synchronized (monitor())
418 {
419 check_orphaned();
420 org.apache.geronimo.deployment.xbeans.AbstractServiceType target = null;
421 target = (org.apache.geronimo.deployment.xbeans.AbstractServiceType)get_store().find_element_user(SERVICE$9, i);
422 if (target == null)
423 {
424 throw new IndexOutOfBoundsException();
425 }
426 return target;
427 }
428 }
429
430 /**
431 * Returns number of "service" element
432 */
433 public int sizeOfServiceArray()
434 {
435 synchronized (monitor())
436 {
437 check_orphaned();
438 return get_store().count_elements(SERVICE$9);
439 }
440 }
441
442 /**
443 * Sets array of all "service" element
444 */
445 public void setServiceArray(org.apache.geronimo.deployment.xbeans.AbstractServiceType[] serviceArray)
446 {
447 synchronized (monitor())
448 {
449 check_orphaned();
450 arraySetterHelper(serviceArray, SERVICE$8, SERVICE$9);
451 }
452 }
453
454 /**
455 * Sets ith "service" element
456 */
457 public void setServiceArray(int i, org.apache.geronimo.deployment.xbeans.AbstractServiceType service)
458 {
459 synchronized (monitor())
460 {
461 check_orphaned();
462 org.apache.geronimo.deployment.xbeans.AbstractServiceType target = null;
463 target = (org.apache.geronimo.deployment.xbeans.AbstractServiceType)get_store().find_element_user(SERVICE$9, i);
464 if (target == null)
465 {
466 throw new IndexOutOfBoundsException();
467 }
468 target.set(service);
469 }
470 }
471
472 /**
473 * Inserts and returns a new empty value (as xml) as the ith "service" element
474 */
475 public org.apache.geronimo.deployment.xbeans.AbstractServiceType insertNewService(int i)
476 {
477 synchronized (monitor())
478 {
479 check_orphaned();
480 org.apache.geronimo.deployment.xbeans.AbstractServiceType target = null;
481 target = (org.apache.geronimo.deployment.xbeans.AbstractServiceType)get_store().insert_element_user(SERVICE$9, SERVICE$8, i);
482 return target;
483 }
484 }
485
486 /**
487 * Appends and returns a new empty value (as xml) as the last "service" element
488 */
489 public org.apache.geronimo.deployment.xbeans.AbstractServiceType addNewService()
490 {
491 synchronized (monitor())
492 {
493 check_orphaned();
494 org.apache.geronimo.deployment.xbeans.AbstractServiceType target = null;
495 target = (org.apache.geronimo.deployment.xbeans.AbstractServiceType)get_store().add_element_user(SERVICE$8);
496 return target;
497 }
498 }
499
500 /**
501 * Removes the ith "service" element
502 */
503 public void removeService(int i)
504 {
505 synchronized (monitor())
506 {
507 check_orphaned();
508 get_store().remove_element(SERVICE$9, i);
509 }
510 }
511
512 /**
513 * Gets the "application-name" attribute
514 */
515 public java.lang.String getApplicationName()
516 {
517 synchronized (monitor())
518 {
519 check_orphaned();
520 org.apache.xmlbeans.SimpleValue target = null;
521 target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(APPLICATIONNAME$10);
522 if (target == null)
523 {
524 return null;
525 }
526 return target.getStringValue();
527 }
528 }
529
530 /**
531 * Gets (as xml) the "application-name" attribute
532 */
533 public org.apache.xmlbeans.XmlString xgetApplicationName()
534 {
535 synchronized (monitor())
536 {
537 check_orphaned();
538 org.apache.xmlbeans.XmlString target = null;
539 target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(APPLICATIONNAME$10);
540 return target;
541 }
542 }
543
544 /**
545 * True if has "application-name" attribute
546 */
547 public boolean isSetApplicationName()
548 {
549 synchronized (monitor())
550 {
551 check_orphaned();
552 return get_store().find_attribute_user(APPLICATIONNAME$10) != null;
553 }
554 }
555
556 /**
557 * Sets the "application-name" attribute
558 */
559 public void setApplicationName(java.lang.String applicationName)
560 {
561 synchronized (monitor())
562 {
563 check_orphaned();
564 org.apache.xmlbeans.SimpleValue target = null;
565 target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(APPLICATIONNAME$10);
566 if (target == null)
567 {
568 target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(APPLICATIONNAME$10);
569 }
570 target.setStringValue(applicationName);
571 }
572 }
573
574 /**
575 * Sets (as xml) the "application-name" attribute
576 */
577 public void xsetApplicationName(org.apache.xmlbeans.XmlString applicationName)
578 {
579 synchronized (monitor())
580 {
581 check_orphaned();
582 org.apache.xmlbeans.XmlString target = null;
583 target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(APPLICATIONNAME$10);
584 if (target == null)
585 {
586 target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(APPLICATIONNAME$10);
587 }
588 target.set(applicationName);
589 }
590 }
591
592 /**
593 * Unsets the "application-name" attribute
594 */
595 public void unsetApplicationName()
596 {
597 synchronized (monitor())
598 {
599 check_orphaned();
600 get_store().remove_attribute(APPLICATIONNAME$10);
601 }
602 }
603 }