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