001/* 002 * XML Type: mapType 003 * Namespace: http://www.springframework.org/schema/beans 004 * Java type: org.springframework.schema.beans.MapType 005 * 006 * Automatically generated - do not modify. 007 */ 008package org.springframework.schema.beans.impl; 009/** 010 * An XML mapType(@http://www.springframework.org/schema/beans). 011 * 012 * This is a complex type. 013 */ 014public class MapTypeImpl extends org.springframework.schema.beans.impl.CollectionTypeImpl implements org.springframework.schema.beans.MapType 015{ 016 private static final long serialVersionUID = 1L; 017 018 public MapTypeImpl(org.apache.xmlbeans.SchemaType sType) 019 { 020 super(sType); 021 } 022 023 private static final javax.xml.namespace.QName DESCRIPTION$0 = 024 new javax.xml.namespace.QName("http://www.springframework.org/schema/beans", "description"); 025 private static final javax.xml.namespace.QName ENTRY$2 = 026 new javax.xml.namespace.QName("http://www.springframework.org/schema/beans", "entry"); 027 private static final javax.xml.namespace.QName KEYTYPE$4 = 028 new javax.xml.namespace.QName("", "key-type"); 029 030 031 /** 032 * Gets the "description" element 033 */ 034 public org.springframework.schema.beans.DescriptionDocument.Description getDescription() 035 { 036 synchronized (monitor()) 037 { 038 check_orphaned(); 039 org.springframework.schema.beans.DescriptionDocument.Description target = null; 040 target = (org.springframework.schema.beans.DescriptionDocument.Description)get_store().find_element_user(DESCRIPTION$0, 0); 041 if (target == null) 042 { 043 return null; 044 } 045 return target; 046 } 047 } 048 049 /** 050 * True if has "description" element 051 */ 052 public boolean isSetDescription() 053 { 054 synchronized (monitor()) 055 { 056 check_orphaned(); 057 return get_store().count_elements(DESCRIPTION$0) != 0; 058 } 059 } 060 061 /** 062 * Sets the "description" element 063 */ 064 public void setDescription(org.springframework.schema.beans.DescriptionDocument.Description description) 065 { 066 synchronized (monitor()) 067 { 068 check_orphaned(); 069 org.springframework.schema.beans.DescriptionDocument.Description target = null; 070 target = (org.springframework.schema.beans.DescriptionDocument.Description)get_store().find_element_user(DESCRIPTION$0, 0); 071 if (target == null) 072 { 073 target = (org.springframework.schema.beans.DescriptionDocument.Description)get_store().add_element_user(DESCRIPTION$0); 074 } 075 target.set(description); 076 } 077 } 078 079 /** 080 * Appends and returns a new empty "description" element 081 */ 082 public org.springframework.schema.beans.DescriptionDocument.Description addNewDescription() 083 { 084 synchronized (monitor()) 085 { 086 check_orphaned(); 087 org.springframework.schema.beans.DescriptionDocument.Description target = null; 088 target = (org.springframework.schema.beans.DescriptionDocument.Description)get_store().add_element_user(DESCRIPTION$0); 089 return target; 090 } 091 } 092 093 /** 094 * Unsets the "description" element 095 */ 096 public void unsetDescription() 097 { 098 synchronized (monitor()) 099 { 100 check_orphaned(); 101 get_store().remove_element(DESCRIPTION$0, 0); 102 } 103 } 104 105 /** 106 * Gets array of all "entry" elements 107 */ 108 public org.springframework.schema.beans.EntryType[] getEntryArray() 109 { 110 synchronized (monitor()) 111 { 112 check_orphaned(); 113 java.util.List targetList = new java.util.ArrayList(); 114 get_store().find_all_element_users(ENTRY$2, targetList); 115 org.springframework.schema.beans.EntryType[] result = new org.springframework.schema.beans.EntryType[targetList.size()]; 116 targetList.toArray(result); 117 return result; 118 } 119 } 120 121 /** 122 * Gets ith "entry" element 123 */ 124 public org.springframework.schema.beans.EntryType getEntryArray(int i) 125 { 126 synchronized (monitor()) 127 { 128 check_orphaned(); 129 org.springframework.schema.beans.EntryType target = null; 130 target = (org.springframework.schema.beans.EntryType)get_store().find_element_user(ENTRY$2, i); 131 if (target == null) 132 { 133 throw new IndexOutOfBoundsException(); 134 } 135 return target; 136 } 137 } 138 139 /** 140 * Returns number of "entry" element 141 */ 142 public int sizeOfEntryArray() 143 { 144 synchronized (monitor()) 145 { 146 check_orphaned(); 147 return get_store().count_elements(ENTRY$2); 148 } 149 } 150 151 /** 152 * Sets array of all "entry" element 153 */ 154 public void setEntryArray(org.springframework.schema.beans.EntryType[] entryArray) 155 { 156 synchronized (monitor()) 157 { 158 check_orphaned(); 159 arraySetterHelper(entryArray, ENTRY$2); 160 } 161 } 162 163 /** 164 * Sets ith "entry" element 165 */ 166 public void setEntryArray(int i, org.springframework.schema.beans.EntryType entry) 167 { 168 synchronized (monitor()) 169 { 170 check_orphaned(); 171 org.springframework.schema.beans.EntryType target = null; 172 target = (org.springframework.schema.beans.EntryType)get_store().find_element_user(ENTRY$2, i); 173 if (target == null) 174 { 175 throw new IndexOutOfBoundsException(); 176 } 177 target.set(entry); 178 } 179 } 180 181 /** 182 * Inserts and returns a new empty value (as xml) as the ith "entry" element 183 */ 184 public org.springframework.schema.beans.EntryType insertNewEntry(int i) 185 { 186 synchronized (monitor()) 187 { 188 check_orphaned(); 189 org.springframework.schema.beans.EntryType target = null; 190 target = (org.springframework.schema.beans.EntryType)get_store().insert_element_user(ENTRY$2, i); 191 return target; 192 } 193 } 194 195 /** 196 * Appends and returns a new empty value (as xml) as the last "entry" element 197 */ 198 public org.springframework.schema.beans.EntryType addNewEntry() 199 { 200 synchronized (monitor()) 201 { 202 check_orphaned(); 203 org.springframework.schema.beans.EntryType target = null; 204 target = (org.springframework.schema.beans.EntryType)get_store().add_element_user(ENTRY$2); 205 return target; 206 } 207 } 208 209 /** 210 * Removes the ith "entry" element 211 */ 212 public void removeEntry(int i) 213 { 214 synchronized (monitor()) 215 { 216 check_orphaned(); 217 get_store().remove_element(ENTRY$2, i); 218 } 219 } 220 221 /** 222 * Gets the "key-type" attribute 223 */ 224 public java.lang.String getKeyType() 225 { 226 synchronized (monitor()) 227 { 228 check_orphaned(); 229 org.apache.xmlbeans.SimpleValue target = null; 230 target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(KEYTYPE$4); 231 if (target == null) 232 { 233 return null; 234 } 235 return target.getStringValue(); 236 } 237 } 238 239 /** 240 * Gets (as xml) the "key-type" attribute 241 */ 242 public org.apache.xmlbeans.XmlString xgetKeyType() 243 { 244 synchronized (monitor()) 245 { 246 check_orphaned(); 247 org.apache.xmlbeans.XmlString target = null; 248 target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(KEYTYPE$4); 249 return target; 250 } 251 } 252 253 /** 254 * True if has "key-type" attribute 255 */ 256 public boolean isSetKeyType() 257 { 258 synchronized (monitor()) 259 { 260 check_orphaned(); 261 return get_store().find_attribute_user(KEYTYPE$4) != null; 262 } 263 } 264 265 /** 266 * Sets the "key-type" attribute 267 */ 268 public void setKeyType(java.lang.String keyType) 269 { 270 synchronized (monitor()) 271 { 272 check_orphaned(); 273 org.apache.xmlbeans.SimpleValue target = null; 274 target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(KEYTYPE$4); 275 if (target == null) 276 { 277 target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(KEYTYPE$4); 278 } 279 target.setStringValue(keyType); 280 } 281 } 282 283 /** 284 * Sets (as xml) the "key-type" attribute 285 */ 286 public void xsetKeyType(org.apache.xmlbeans.XmlString keyType) 287 { 288 synchronized (monitor()) 289 { 290 check_orphaned(); 291 org.apache.xmlbeans.XmlString target = null; 292 target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(KEYTYPE$4); 293 if (target == null) 294 { 295 target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(KEYTYPE$4); 296 } 297 target.set(keyType); 298 } 299 } 300 301 /** 302 * Unsets the "key-type" attribute 303 */ 304 public void unsetKeyType() 305 { 306 synchronized (monitor()) 307 { 308 check_orphaned(); 309 get_store().remove_attribute(KEYTYPE$4); 310 } 311 } 312}