001 /* 002 * An XML document type. 003 * Localname: persistence-unit-ref 004 * Namespace: http://geronimo.apache.org/xml/ns/naming-1.2 005 * Java type: org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceUnitRefDocument 006 * 007 * Automatically generated - do not modify. 008 */ 009 package org.apache.geronimo.xbeans.geronimo.naming.impl; 010 /** 011 * A document containing one persistence-unit-ref(@http://geronimo.apache.org/xml/ns/naming-1.2) element. 012 * 013 * This is a complex type. 014 */ 015 public class GerPersistenceUnitRefDocumentImpl extends org.apache.geronimo.xbeans.geronimo.naming.impl.GerAbstractNamingEntryDocumentImpl implements org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceUnitRefDocument 016 { 017 018 public GerPersistenceUnitRefDocumentImpl(org.apache.xmlbeans.SchemaType sType) 019 { 020 super(sType); 021 } 022 023 private static final javax.xml.namespace.QName PERSISTENCEUNITREF$0 = 024 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/naming-1.2", "persistence-unit-ref"); 025 026 027 /** 028 * Gets the "persistence-unit-ref" element 029 */ 030 public org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceUnitRefType getPersistenceUnitRef() 031 { 032 synchronized (monitor()) 033 { 034 check_orphaned(); 035 org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceUnitRefType target = null; 036 target = (org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceUnitRefType)get_store().find_element_user(PERSISTENCEUNITREF$0, 0); 037 if (target == null) 038 { 039 return null; 040 } 041 return target; 042 } 043 } 044 045 /** 046 * Sets the "persistence-unit-ref" element 047 */ 048 public void setPersistenceUnitRef(org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceUnitRefType persistenceUnitRef) 049 { 050 synchronized (monitor()) 051 { 052 check_orphaned(); 053 org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceUnitRefType target = null; 054 target = (org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceUnitRefType)get_store().find_element_user(PERSISTENCEUNITREF$0, 0); 055 if (target == null) 056 { 057 target = (org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceUnitRefType)get_store().add_element_user(PERSISTENCEUNITREF$0); 058 } 059 target.set(persistenceUnitRef); 060 } 061 } 062 063 /** 064 * Appends and returns a new empty "persistence-unit-ref" element 065 */ 066 public org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceUnitRefType addNewPersistenceUnitRef() 067 { 068 synchronized (monitor()) 069 { 070 check_orphaned(); 071 org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceUnitRefType target = null; 072 target = (org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceUnitRefType)get_store().add_element_user(PERSISTENCEUNITREF$0); 073 return target; 074 } 075 } 076 }