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