001 /* 002 * XML Type: persistence-context-refType 003 * Namespace: http://geronimo.apache.org/xml/ns/naming-1.2 004 * Java type: org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceContextRefType 005 * 006 * Automatically generated - do not modify. 007 */ 008 package org.apache.geronimo.xbeans.geronimo.naming.impl; 009 /** 010 * An XML persistence-context-refType(@http://geronimo.apache.org/xml/ns/naming-1.2). 011 * 012 * This is a complex type. 013 */ 014 public class GerPersistenceContextRefTypeImpl extends org.apache.geronimo.xbeans.geronimo.naming.impl.GerAbstractNamingEntryTypeImpl implements org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceContextRefType 015 { 016 017 public GerPersistenceContextRefTypeImpl(org.apache.xmlbeans.SchemaType sType) 018 { 019 super(sType); 020 } 021 022 private static final javax.xml.namespace.QName PERSISTENCECONTEXTREFNAME$0 = 023 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/naming-1.2", "persistence-context-ref-name"); 024 private static final javax.xml.namespace.QName PERSISTENCEUNITNAME$2 = 025 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/naming-1.2", "persistence-unit-name"); 026 private static final javax.xml.namespace.QName PATTERN$4 = 027 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/naming-1.2", "pattern"); 028 private static final javax.xml.namespace.QName PERSISTENCECONTEXTTYPE$6 = 029 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/naming-1.2", "persistence-context-type"); 030 private static final javax.xml.namespace.QName PROPERTY$8 = 031 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/naming-1.2", "property"); 032 033 034 /** 035 * Gets the "persistence-context-ref-name" element 036 */ 037 public java.lang.String getPersistenceContextRefName() 038 { 039 synchronized (monitor()) 040 { 041 check_orphaned(); 042 org.apache.xmlbeans.SimpleValue target = null; 043 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PERSISTENCECONTEXTREFNAME$0, 0); 044 if (target == null) 045 { 046 return null; 047 } 048 return target.getStringValue(); 049 } 050 } 051 052 /** 053 * Gets (as xml) the "persistence-context-ref-name" element 054 */ 055 public org.apache.xmlbeans.XmlString xgetPersistenceContextRefName() 056 { 057 synchronized (monitor()) 058 { 059 check_orphaned(); 060 org.apache.xmlbeans.XmlString target = null; 061 target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(PERSISTENCECONTEXTREFNAME$0, 0); 062 return target; 063 } 064 } 065 066 /** 067 * Sets the "persistence-context-ref-name" element 068 */ 069 public void setPersistenceContextRefName(java.lang.String persistenceContextRefName) 070 { 071 synchronized (monitor()) 072 { 073 check_orphaned(); 074 org.apache.xmlbeans.SimpleValue target = null; 075 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PERSISTENCECONTEXTREFNAME$0, 0); 076 if (target == null) 077 { 078 target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(PERSISTENCECONTEXTREFNAME$0); 079 } 080 target.setStringValue(persistenceContextRefName); 081 } 082 } 083 084 /** 085 * Sets (as xml) the "persistence-context-ref-name" element 086 */ 087 public void xsetPersistenceContextRefName(org.apache.xmlbeans.XmlString persistenceContextRefName) 088 { 089 synchronized (monitor()) 090 { 091 check_orphaned(); 092 org.apache.xmlbeans.XmlString target = null; 093 target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(PERSISTENCECONTEXTREFNAME$0, 0); 094 if (target == null) 095 { 096 target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(PERSISTENCECONTEXTREFNAME$0); 097 } 098 target.set(persistenceContextRefName); 099 } 100 } 101 102 /** 103 * Gets the "persistence-unit-name" element 104 */ 105 public java.lang.String getPersistenceUnitName() 106 { 107 synchronized (monitor()) 108 { 109 check_orphaned(); 110 org.apache.xmlbeans.SimpleValue target = null; 111 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PERSISTENCEUNITNAME$2, 0); 112 if (target == null) 113 { 114 return null; 115 } 116 return target.getStringValue(); 117 } 118 } 119 120 /** 121 * Gets (as xml) the "persistence-unit-name" element 122 */ 123 public org.apache.xmlbeans.XmlString xgetPersistenceUnitName() 124 { 125 synchronized (monitor()) 126 { 127 check_orphaned(); 128 org.apache.xmlbeans.XmlString target = null; 129 target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(PERSISTENCEUNITNAME$2, 0); 130 return target; 131 } 132 } 133 134 /** 135 * True if has "persistence-unit-name" element 136 */ 137 public boolean isSetPersistenceUnitName() 138 { 139 synchronized (monitor()) 140 { 141 check_orphaned(); 142 return get_store().count_elements(PERSISTENCEUNITNAME$2) != 0; 143 } 144 } 145 146 /** 147 * Sets the "persistence-unit-name" element 148 */ 149 public void setPersistenceUnitName(java.lang.String persistenceUnitName) 150 { 151 synchronized (monitor()) 152 { 153 check_orphaned(); 154 org.apache.xmlbeans.SimpleValue target = null; 155 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PERSISTENCEUNITNAME$2, 0); 156 if (target == null) 157 { 158 target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(PERSISTENCEUNITNAME$2); 159 } 160 target.setStringValue(persistenceUnitName); 161 } 162 } 163 164 /** 165 * Sets (as xml) the "persistence-unit-name" element 166 */ 167 public void xsetPersistenceUnitName(org.apache.xmlbeans.XmlString persistenceUnitName) 168 { 169 synchronized (monitor()) 170 { 171 check_orphaned(); 172 org.apache.xmlbeans.XmlString target = null; 173 target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(PERSISTENCEUNITNAME$2, 0); 174 if (target == null) 175 { 176 target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(PERSISTENCEUNITNAME$2); 177 } 178 target.set(persistenceUnitName); 179 } 180 } 181 182 /** 183 * Unsets the "persistence-unit-name" element 184 */ 185 public void unsetPersistenceUnitName() 186 { 187 synchronized (monitor()) 188 { 189 check_orphaned(); 190 get_store().remove_element(PERSISTENCEUNITNAME$2, 0); 191 } 192 } 193 194 /** 195 * Gets the "pattern" element 196 */ 197 public org.apache.geronimo.xbeans.geronimo.naming.GerPatternType getPattern() 198 { 199 synchronized (monitor()) 200 { 201 check_orphaned(); 202 org.apache.geronimo.xbeans.geronimo.naming.GerPatternType target = null; 203 target = (org.apache.geronimo.xbeans.geronimo.naming.GerPatternType)get_store().find_element_user(PATTERN$4, 0); 204 if (target == null) 205 { 206 return null; 207 } 208 return target; 209 } 210 } 211 212 /** 213 * True if has "pattern" element 214 */ 215 public boolean isSetPattern() 216 { 217 synchronized (monitor()) 218 { 219 check_orphaned(); 220 return get_store().count_elements(PATTERN$4) != 0; 221 } 222 } 223 224 /** 225 * Sets the "pattern" element 226 */ 227 public void setPattern(org.apache.geronimo.xbeans.geronimo.naming.GerPatternType pattern) 228 { 229 synchronized (monitor()) 230 { 231 check_orphaned(); 232 org.apache.geronimo.xbeans.geronimo.naming.GerPatternType target = null; 233 target = (org.apache.geronimo.xbeans.geronimo.naming.GerPatternType)get_store().find_element_user(PATTERN$4, 0); 234 if (target == null) 235 { 236 target = (org.apache.geronimo.xbeans.geronimo.naming.GerPatternType)get_store().add_element_user(PATTERN$4); 237 } 238 target.set(pattern); 239 } 240 } 241 242 /** 243 * Appends and returns a new empty "pattern" element 244 */ 245 public org.apache.geronimo.xbeans.geronimo.naming.GerPatternType addNewPattern() 246 { 247 synchronized (monitor()) 248 { 249 check_orphaned(); 250 org.apache.geronimo.xbeans.geronimo.naming.GerPatternType target = null; 251 target = (org.apache.geronimo.xbeans.geronimo.naming.GerPatternType)get_store().add_element_user(PATTERN$4); 252 return target; 253 } 254 } 255 256 /** 257 * Unsets the "pattern" element 258 */ 259 public void unsetPattern() 260 { 261 synchronized (monitor()) 262 { 263 check_orphaned(); 264 get_store().remove_element(PATTERN$4, 0); 265 } 266 } 267 268 /** 269 * Gets the "persistence-context-type" element 270 */ 271 public org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceContextTypeType.Enum getPersistenceContextType() 272 { 273 synchronized (monitor()) 274 { 275 check_orphaned(); 276 org.apache.xmlbeans.SimpleValue target = null; 277 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PERSISTENCECONTEXTTYPE$6, 0); 278 if (target == null) 279 { 280 return null; 281 } 282 return (org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceContextTypeType.Enum)target.getEnumValue(); 283 } 284 } 285 286 /** 287 * Gets (as xml) the "persistence-context-type" element 288 */ 289 public org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceContextTypeType xgetPersistenceContextType() 290 { 291 synchronized (monitor()) 292 { 293 check_orphaned(); 294 org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceContextTypeType target = null; 295 target = (org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceContextTypeType)get_store().find_element_user(PERSISTENCECONTEXTTYPE$6, 0); 296 return target; 297 } 298 } 299 300 /** 301 * True if has "persistence-context-type" element 302 */ 303 public boolean isSetPersistenceContextType() 304 { 305 synchronized (monitor()) 306 { 307 check_orphaned(); 308 return get_store().count_elements(PERSISTENCECONTEXTTYPE$6) != 0; 309 } 310 } 311 312 /** 313 * Sets the "persistence-context-type" element 314 */ 315 public void setPersistenceContextType(org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceContextTypeType.Enum persistenceContextType) 316 { 317 synchronized (monitor()) 318 { 319 check_orphaned(); 320 org.apache.xmlbeans.SimpleValue target = null; 321 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PERSISTENCECONTEXTTYPE$6, 0); 322 if (target == null) 323 { 324 target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(PERSISTENCECONTEXTTYPE$6); 325 } 326 target.setEnumValue(persistenceContextType); 327 } 328 } 329 330 /** 331 * Sets (as xml) the "persistence-context-type" element 332 */ 333 public void xsetPersistenceContextType(org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceContextTypeType persistenceContextType) 334 { 335 synchronized (monitor()) 336 { 337 check_orphaned(); 338 org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceContextTypeType target = null; 339 target = (org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceContextTypeType)get_store().find_element_user(PERSISTENCECONTEXTTYPE$6, 0); 340 if (target == null) 341 { 342 target = (org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceContextTypeType)get_store().add_element_user(PERSISTENCECONTEXTTYPE$6); 343 } 344 target.set(persistenceContextType); 345 } 346 } 347 348 /** 349 * Unsets the "persistence-context-type" element 350 */ 351 public void unsetPersistenceContextType() 352 { 353 synchronized (monitor()) 354 { 355 check_orphaned(); 356 get_store().remove_element(PERSISTENCECONTEXTTYPE$6, 0); 357 } 358 } 359 360 /** 361 * Gets array of all "property" elements 362 */ 363 public org.apache.geronimo.xbeans.geronimo.naming.GerPropertyType[] getPropertyArray() 364 { 365 synchronized (monitor()) 366 { 367 check_orphaned(); 368 java.util.List targetList = new java.util.ArrayList(); 369 get_store().find_all_element_users(PROPERTY$8, targetList); 370 org.apache.geronimo.xbeans.geronimo.naming.GerPropertyType[] result = new org.apache.geronimo.xbeans.geronimo.naming.GerPropertyType[targetList.size()]; 371 targetList.toArray(result); 372 return result; 373 } 374 } 375 376 /** 377 * Gets ith "property" element 378 */ 379 public org.apache.geronimo.xbeans.geronimo.naming.GerPropertyType getPropertyArray(int i) 380 { 381 synchronized (monitor()) 382 { 383 check_orphaned(); 384 org.apache.geronimo.xbeans.geronimo.naming.GerPropertyType target = null; 385 target = (org.apache.geronimo.xbeans.geronimo.naming.GerPropertyType)get_store().find_element_user(PROPERTY$8, i); 386 if (target == null) 387 { 388 throw new IndexOutOfBoundsException(); 389 } 390 return target; 391 } 392 } 393 394 /** 395 * Returns number of "property" element 396 */ 397 public int sizeOfPropertyArray() 398 { 399 synchronized (monitor()) 400 { 401 check_orphaned(); 402 return get_store().count_elements(PROPERTY$8); 403 } 404 } 405 406 /** 407 * Sets array of all "property" element 408 */ 409 public void setPropertyArray(org.apache.geronimo.xbeans.geronimo.naming.GerPropertyType[] propertyArray) 410 { 411 synchronized (monitor()) 412 { 413 check_orphaned(); 414 arraySetterHelper(propertyArray, PROPERTY$8); 415 } 416 } 417 418 /** 419 * Sets ith "property" element 420 */ 421 public void setPropertyArray(int i, org.apache.geronimo.xbeans.geronimo.naming.GerPropertyType property) 422 { 423 synchronized (monitor()) 424 { 425 check_orphaned(); 426 org.apache.geronimo.xbeans.geronimo.naming.GerPropertyType target = null; 427 target = (org.apache.geronimo.xbeans.geronimo.naming.GerPropertyType)get_store().find_element_user(PROPERTY$8, i); 428 if (target == null) 429 { 430 throw new IndexOutOfBoundsException(); 431 } 432 target.set(property); 433 } 434 } 435 436 /** 437 * Inserts and returns a new empty value (as xml) as the ith "property" element 438 */ 439 public org.apache.geronimo.xbeans.geronimo.naming.GerPropertyType insertNewProperty(int i) 440 { 441 synchronized (monitor()) 442 { 443 check_orphaned(); 444 org.apache.geronimo.xbeans.geronimo.naming.GerPropertyType target = null; 445 target = (org.apache.geronimo.xbeans.geronimo.naming.GerPropertyType)get_store().insert_element_user(PROPERTY$8, i); 446 return target; 447 } 448 } 449 450 /** 451 * Appends and returns a new empty value (as xml) as the last "property" element 452 */ 453 public org.apache.geronimo.xbeans.geronimo.naming.GerPropertyType addNewProperty() 454 { 455 synchronized (monitor()) 456 { 457 check_orphaned(); 458 org.apache.geronimo.xbeans.geronimo.naming.GerPropertyType target = null; 459 target = (org.apache.geronimo.xbeans.geronimo.naming.GerPropertyType)get_store().add_element_user(PROPERTY$8); 460 return target; 461 } 462 } 463 464 /** 465 * Removes the ith "property" element 466 */ 467 public void removeProperty(int i) 468 { 469 synchronized (monitor()) 470 { 471 check_orphaned(); 472 get_store().remove_element(PROPERTY$8, i); 473 } 474 } 475 }