001 /* 002 * XML Type: referencesType 003 * Namespace: http://geronimo.apache.org/xml/ns/deployment-1.2 004 * Java type: org.apache.geronimo.deployment.xbeans.ReferencesType 005 * 006 * Automatically generated - do not modify. 007 */ 008 package org.apache.geronimo.deployment.xbeans.impl; 009 /** 010 * An XML referencesType(@http://geronimo.apache.org/xml/ns/deployment-1.2). 011 * 012 * This is a complex type. 013 */ 014 public class ReferencesTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.geronimo.deployment.xbeans.ReferencesType 015 { 016 017 public ReferencesTypeImpl(org.apache.xmlbeans.SchemaType sType) 018 { 019 super(sType); 020 } 021 022 private static final javax.xml.namespace.QName PATTERN$0 = 023 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/deployment-1.2", "pattern"); 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 "pattern" elements 030 */ 031 public org.apache.geronimo.deployment.xbeans.PatternType[] getPatternArray() 032 { 033 synchronized (monitor()) 034 { 035 check_orphaned(); 036 java.util.List targetList = new java.util.ArrayList(); 037 get_store().find_all_element_users(PATTERN$0, targetList); 038 org.apache.geronimo.deployment.xbeans.PatternType[] result = new org.apache.geronimo.deployment.xbeans.PatternType[targetList.size()]; 039 targetList.toArray(result); 040 return result; 041 } 042 } 043 044 /** 045 * Gets ith "pattern" element 046 */ 047 public org.apache.geronimo.deployment.xbeans.PatternType getPatternArray(int i) 048 { 049 synchronized (monitor()) 050 { 051 check_orphaned(); 052 org.apache.geronimo.deployment.xbeans.PatternType target = null; 053 target = (org.apache.geronimo.deployment.xbeans.PatternType)get_store().find_element_user(PATTERN$0, i); 054 if (target == null) 055 { 056 throw new IndexOutOfBoundsException(); 057 } 058 return target; 059 } 060 } 061 062 /** 063 * Returns number of "pattern" element 064 */ 065 public int sizeOfPatternArray() 066 { 067 synchronized (monitor()) 068 { 069 check_orphaned(); 070 return get_store().count_elements(PATTERN$0); 071 } 072 } 073 074 /** 075 * Sets array of all "pattern" element 076 */ 077 public void setPatternArray(org.apache.geronimo.deployment.xbeans.PatternType[] patternArray) 078 { 079 synchronized (monitor()) 080 { 081 check_orphaned(); 082 arraySetterHelper(patternArray, PATTERN$0); 083 } 084 } 085 086 /** 087 * Sets ith "pattern" element 088 */ 089 public void setPatternArray(int i, org.apache.geronimo.deployment.xbeans.PatternType pattern) 090 { 091 synchronized (monitor()) 092 { 093 check_orphaned(); 094 org.apache.geronimo.deployment.xbeans.PatternType target = null; 095 target = (org.apache.geronimo.deployment.xbeans.PatternType)get_store().find_element_user(PATTERN$0, i); 096 if (target == null) 097 { 098 throw new IndexOutOfBoundsException(); 099 } 100 target.set(pattern); 101 } 102 } 103 104 /** 105 * Inserts and returns a new empty value (as xml) as the ith "pattern" element 106 */ 107 public org.apache.geronimo.deployment.xbeans.PatternType insertNewPattern(int i) 108 { 109 synchronized (monitor()) 110 { 111 check_orphaned(); 112 org.apache.geronimo.deployment.xbeans.PatternType target = null; 113 target = (org.apache.geronimo.deployment.xbeans.PatternType)get_store().insert_element_user(PATTERN$0, i); 114 return target; 115 } 116 } 117 118 /** 119 * Appends and returns a new empty value (as xml) as the last "pattern" element 120 */ 121 public org.apache.geronimo.deployment.xbeans.PatternType addNewPattern() 122 { 123 synchronized (monitor()) 124 { 125 check_orphaned(); 126 org.apache.geronimo.deployment.xbeans.PatternType target = null; 127 target = (org.apache.geronimo.deployment.xbeans.PatternType)get_store().add_element_user(PATTERN$0); 128 return target; 129 } 130 } 131 132 /** 133 * Removes the ith "pattern" element 134 */ 135 public void removePattern(int i) 136 { 137 synchronized (monitor()) 138 { 139 check_orphaned(); 140 get_store().remove_element(PATTERN$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.XmlString xgetName() 166 { 167 synchronized (monitor()) 168 { 169 check_orphaned(); 170 org.apache.xmlbeans.XmlString target = null; 171 target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$2); 172 return target; 173 } 174 } 175 176 /** 177 * True if has "name" attribute 178 */ 179 public boolean isSetName() 180 { 181 synchronized (monitor()) 182 { 183 check_orphaned(); 184 return get_store().find_attribute_user(NAME$2) != null; 185 } 186 } 187 188 /** 189 * Sets the "name" attribute 190 */ 191 public void setName(java.lang.String name) 192 { 193 synchronized (monitor()) 194 { 195 check_orphaned(); 196 org.apache.xmlbeans.SimpleValue target = null; 197 target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$2); 198 if (target == null) 199 { 200 target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$2); 201 } 202 target.setStringValue(name); 203 } 204 } 205 206 /** 207 * Sets (as xml) the "name" attribute 208 */ 209 public void xsetName(org.apache.xmlbeans.XmlString name) 210 { 211 synchronized (monitor()) 212 { 213 check_orphaned(); 214 org.apache.xmlbeans.XmlString target = null; 215 target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$2); 216 if (target == null) 217 { 218 target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(NAME$2); 219 } 220 target.set(name); 221 } 222 } 223 224 /** 225 * Unsets the "name" attribute 226 */ 227 public void unsetName() 228 { 229 synchronized (monitor()) 230 { 231 check_orphaned(); 232 get_store().remove_attribute(NAME$2); 233 } 234 } 235 }