001 /*
002 * XML Type: default-subjectType
003 * Namespace: http://geronimo.apache.org/xml/ns/subject-info-1.0
004 * Java type: org.apache.geronimo.xbeans.geronimo.security.subjectinfo.GerDefaultSubjectType
005 *
006 * Automatically generated - do not modify.
007 */
008 package org.apache.geronimo.xbeans.geronimo.security.subjectinfo.impl;
009 /**
010 * An XML default-subjectType(@http://geronimo.apache.org/xml/ns/subject-info-1.0).
011 *
012 * This is a complex type.
013 */
014 public class GerDefaultSubjectTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.geronimo.xbeans.geronimo.security.subjectinfo.GerDefaultSubjectType
015 {
016
017 public GerDefaultSubjectTypeImpl(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
029
030 /**
031 * Gets array of all "description" elements
032 */
033 public org.apache.geronimo.xbeans.geronimo.security.subjectinfo.GerDescriptionType[] 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.xbeans.geronimo.security.subjectinfo.GerDescriptionType[] result = new org.apache.geronimo.xbeans.geronimo.security.subjectinfo.GerDescriptionType[targetList.size()];
041 targetList.toArray(result);
042 return result;
043 }
044 }
045
046 /**
047 * Gets ith "description" element
048 */
049 public org.apache.geronimo.xbeans.geronimo.security.subjectinfo.GerDescriptionType getDescriptionArray(int i)
050 {
051 synchronized (monitor())
052 {
053 check_orphaned();
054 org.apache.geronimo.xbeans.geronimo.security.subjectinfo.GerDescriptionType target = null;
055 target = (org.apache.geronimo.xbeans.geronimo.security.subjectinfo.GerDescriptionType)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.xbeans.geronimo.security.subjectinfo.GerDescriptionType[] 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.xbeans.geronimo.security.subjectinfo.GerDescriptionType description)
092 {
093 synchronized (monitor())
094 {
095 check_orphaned();
096 org.apache.geronimo.xbeans.geronimo.security.subjectinfo.GerDescriptionType target = null;
097 target = (org.apache.geronimo.xbeans.geronimo.security.subjectinfo.GerDescriptionType)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.xbeans.geronimo.security.subjectinfo.GerDescriptionType insertNewDescription(int i)
110 {
111 synchronized (monitor())
112 {
113 check_orphaned();
114 org.apache.geronimo.xbeans.geronimo.security.subjectinfo.GerDescriptionType target = null;
115 target = (org.apache.geronimo.xbeans.geronimo.security.subjectinfo.GerDescriptionType)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.xbeans.geronimo.security.subjectinfo.GerDescriptionType addNewDescription()
124 {
125 synchronized (monitor())
126 {
127 check_orphaned();
128 org.apache.geronimo.xbeans.geronimo.security.subjectinfo.GerDescriptionType target = null;
129 target = (org.apache.geronimo.xbeans.geronimo.security.subjectinfo.GerDescriptionType)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 "realm" element
148 */
149 public java.lang.String getRealm()
150 {
151 synchronized (monitor())
152 {
153 check_orphaned();
154 org.apache.xmlbeans.SimpleValue target = null;
155 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REALM$2, 0);
156 if (target == null)
157 {
158 return null;
159 }
160 return target.getStringValue();
161 }
162 }
163
164 /**
165 * Gets (as xml) the "realm" element
166 */
167 public org.apache.xmlbeans.XmlString xgetRealm()
168 {
169 synchronized (monitor())
170 {
171 check_orphaned();
172 org.apache.xmlbeans.XmlString target = null;
173 target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(REALM$2, 0);
174 return target;
175 }
176 }
177
178 /**
179 * Sets the "realm" element
180 */
181 public void setRealm(java.lang.String realm)
182 {
183 synchronized (monitor())
184 {
185 check_orphaned();
186 org.apache.xmlbeans.SimpleValue target = null;
187 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REALM$2, 0);
188 if (target == null)
189 {
190 target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(REALM$2);
191 }
192 target.setStringValue(realm);
193 }
194 }
195
196 /**
197 * Sets (as xml) the "realm" element
198 */
199 public void xsetRealm(org.apache.xmlbeans.XmlString realm)
200 {
201 synchronized (monitor())
202 {
203 check_orphaned();
204 org.apache.xmlbeans.XmlString target = null;
205 target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(REALM$2, 0);
206 if (target == null)
207 {
208 target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(REALM$2);
209 }
210 target.set(realm);
211 }
212 }
213
214 /**
215 * Gets the "id" element
216 */
217 public java.lang.String getId()
218 {
219 synchronized (monitor())
220 {
221 check_orphaned();
222 org.apache.xmlbeans.SimpleValue target = null;
223 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ID$4, 0);
224 if (target == null)
225 {
226 return null;
227 }
228 return target.getStringValue();
229 }
230 }
231
232 /**
233 * Gets (as xml) the "id" element
234 */
235 public org.apache.xmlbeans.XmlString xgetId()
236 {
237 synchronized (monitor())
238 {
239 check_orphaned();
240 org.apache.xmlbeans.XmlString target = null;
241 target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(ID$4, 0);
242 return target;
243 }
244 }
245
246 /**
247 * Sets the "id" element
248 */
249 public void setId(java.lang.String id)
250 {
251 synchronized (monitor())
252 {
253 check_orphaned();
254 org.apache.xmlbeans.SimpleValue target = null;
255 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ID$4, 0);
256 if (target == null)
257 {
258 target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ID$4);
259 }
260 target.setStringValue(id);
261 }
262 }
263
264 /**
265 * Sets (as xml) the "id" element
266 */
267 public void xsetId(org.apache.xmlbeans.XmlString id)
268 {
269 synchronized (monitor())
270 {
271 check_orphaned();
272 org.apache.xmlbeans.XmlString target = null;
273 target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(ID$4, 0);
274 if (target == null)
275 {
276 target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(ID$4);
277 }
278 target.set(id);
279 }
280 }
281 }