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