001 /* 002 * XML Type: persistence-unit-refType 003 * Namespace: http://geronimo.apache.org/xml/ns/naming-1.2 004 * Java type: org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceUnitRefType 005 * 006 * Automatically generated - do not modify. 007 */ 008 package org.apache.geronimo.xbeans.geronimo.naming.impl; 009 /** 010 * An XML persistence-unit-refType(@http://geronimo.apache.org/xml/ns/naming-1.2). 011 * 012 * This is a complex type. 013 */ 014 public class GerPersistenceUnitRefTypeImpl extends org.apache.geronimo.xbeans.geronimo.naming.impl.GerAbstractNamingEntryTypeImpl implements org.apache.geronimo.xbeans.geronimo.naming.GerPersistenceUnitRefType 015 { 016 017 public GerPersistenceUnitRefTypeImpl(org.apache.xmlbeans.SchemaType sType) 018 { 019 super(sType); 020 } 021 022 private static final javax.xml.namespace.QName PERSISTENCEUNITREFNAME$0 = 023 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/naming-1.2", "persistence-unit-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 029 030 /** 031 * Gets the "persistence-unit-ref-name" element 032 */ 033 public java.lang.String getPersistenceUnitRefName() 034 { 035 synchronized (monitor()) 036 { 037 check_orphaned(); 038 org.apache.xmlbeans.SimpleValue target = null; 039 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PERSISTENCEUNITREFNAME$0, 0); 040 if (target == null) 041 { 042 return null; 043 } 044 return target.getStringValue(); 045 } 046 } 047 048 /** 049 * Gets (as xml) the "persistence-unit-ref-name" element 050 */ 051 public org.apache.xmlbeans.XmlString xgetPersistenceUnitRefName() 052 { 053 synchronized (monitor()) 054 { 055 check_orphaned(); 056 org.apache.xmlbeans.XmlString target = null; 057 target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(PERSISTENCEUNITREFNAME$0, 0); 058 return target; 059 } 060 } 061 062 /** 063 * Sets the "persistence-unit-ref-name" element 064 */ 065 public void setPersistenceUnitRefName(java.lang.String persistenceUnitRefName) 066 { 067 synchronized (monitor()) 068 { 069 check_orphaned(); 070 org.apache.xmlbeans.SimpleValue target = null; 071 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PERSISTENCEUNITREFNAME$0, 0); 072 if (target == null) 073 { 074 target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(PERSISTENCEUNITREFNAME$0); 075 } 076 target.setStringValue(persistenceUnitRefName); 077 } 078 } 079 080 /** 081 * Sets (as xml) the "persistence-unit-ref-name" element 082 */ 083 public void xsetPersistenceUnitRefName(org.apache.xmlbeans.XmlString persistenceUnitRefName) 084 { 085 synchronized (monitor()) 086 { 087 check_orphaned(); 088 org.apache.xmlbeans.XmlString target = null; 089 target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(PERSISTENCEUNITREFNAME$0, 0); 090 if (target == null) 091 { 092 target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(PERSISTENCEUNITREFNAME$0); 093 } 094 target.set(persistenceUnitRefName); 095 } 096 } 097 098 /** 099 * Gets the "persistence-unit-name" element 100 */ 101 public java.lang.String getPersistenceUnitName() 102 { 103 synchronized (monitor()) 104 { 105 check_orphaned(); 106 org.apache.xmlbeans.SimpleValue target = null; 107 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PERSISTENCEUNITNAME$2, 0); 108 if (target == null) 109 { 110 return null; 111 } 112 return target.getStringValue(); 113 } 114 } 115 116 /** 117 * Gets (as xml) the "persistence-unit-name" element 118 */ 119 public org.apache.xmlbeans.XmlString xgetPersistenceUnitName() 120 { 121 synchronized (monitor()) 122 { 123 check_orphaned(); 124 org.apache.xmlbeans.XmlString target = null; 125 target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(PERSISTENCEUNITNAME$2, 0); 126 return target; 127 } 128 } 129 130 /** 131 * True if has "persistence-unit-name" element 132 */ 133 public boolean isSetPersistenceUnitName() 134 { 135 synchronized (monitor()) 136 { 137 check_orphaned(); 138 return get_store().count_elements(PERSISTENCEUNITNAME$2) != 0; 139 } 140 } 141 142 /** 143 * Sets the "persistence-unit-name" element 144 */ 145 public void setPersistenceUnitName(java.lang.String persistenceUnitName) 146 { 147 synchronized (monitor()) 148 { 149 check_orphaned(); 150 org.apache.xmlbeans.SimpleValue target = null; 151 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(PERSISTENCEUNITNAME$2, 0); 152 if (target == null) 153 { 154 target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(PERSISTENCEUNITNAME$2); 155 } 156 target.setStringValue(persistenceUnitName); 157 } 158 } 159 160 /** 161 * Sets (as xml) the "persistence-unit-name" element 162 */ 163 public void xsetPersistenceUnitName(org.apache.xmlbeans.XmlString persistenceUnitName) 164 { 165 synchronized (monitor()) 166 { 167 check_orphaned(); 168 org.apache.xmlbeans.XmlString target = null; 169 target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(PERSISTENCEUNITNAME$2, 0); 170 if (target == null) 171 { 172 target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(PERSISTENCEUNITNAME$2); 173 } 174 target.set(persistenceUnitName); 175 } 176 } 177 178 /** 179 * Unsets the "persistence-unit-name" element 180 */ 181 public void unsetPersistenceUnitName() 182 { 183 synchronized (monitor()) 184 { 185 check_orphaned(); 186 get_store().remove_element(PERSISTENCEUNITNAME$2, 0); 187 } 188 } 189 190 /** 191 * Gets the "pattern" element 192 */ 193 public org.apache.geronimo.xbeans.geronimo.naming.GerPatternType getPattern() 194 { 195 synchronized (monitor()) 196 { 197 check_orphaned(); 198 org.apache.geronimo.xbeans.geronimo.naming.GerPatternType target = null; 199 target = (org.apache.geronimo.xbeans.geronimo.naming.GerPatternType)get_store().find_element_user(PATTERN$4, 0); 200 if (target == null) 201 { 202 return null; 203 } 204 return target; 205 } 206 } 207 208 /** 209 * True if has "pattern" element 210 */ 211 public boolean isSetPattern() 212 { 213 synchronized (monitor()) 214 { 215 check_orphaned(); 216 return get_store().count_elements(PATTERN$4) != 0; 217 } 218 } 219 220 /** 221 * Sets the "pattern" element 222 */ 223 public void setPattern(org.apache.geronimo.xbeans.geronimo.naming.GerPatternType pattern) 224 { 225 synchronized (monitor()) 226 { 227 check_orphaned(); 228 org.apache.geronimo.xbeans.geronimo.naming.GerPatternType target = null; 229 target = (org.apache.geronimo.xbeans.geronimo.naming.GerPatternType)get_store().find_element_user(PATTERN$4, 0); 230 if (target == null) 231 { 232 target = (org.apache.geronimo.xbeans.geronimo.naming.GerPatternType)get_store().add_element_user(PATTERN$4); 233 } 234 target.set(pattern); 235 } 236 } 237 238 /** 239 * Appends and returns a new empty "pattern" element 240 */ 241 public org.apache.geronimo.xbeans.geronimo.naming.GerPatternType addNewPattern() 242 { 243 synchronized (monitor()) 244 { 245 check_orphaned(); 246 org.apache.geronimo.xbeans.geronimo.naming.GerPatternType target = null; 247 target = (org.apache.geronimo.xbeans.geronimo.naming.GerPatternType)get_store().add_element_user(PATTERN$4); 248 return target; 249 } 250 } 251 252 /** 253 * Unsets the "pattern" element 254 */ 255 public void unsetPattern() 256 { 257 synchronized (monitor()) 258 { 259 check_orphaned(); 260 get_store().remove_element(PATTERN$4, 0); 261 } 262 } 263 }