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