001: /*
002: * An XML document type.
003: * Localname: alertDef
004: * Namespace: http://cbesb.bostechcorp.com/alert/1.0
005: * Java type: com.bostechcorp.cbesb.alert.x10.AlertDefDocument
006: *
007: * Automatically generated - do not modify.
008: */
009: package com.bostechcorp.cbesb.alert.x10.impl;
010:
011: /**
012: * A document containing one alertDef(@http://cbesb.bostechcorp.com/alert/1.0) element.
013: *
014: * This is a complex type.
015: */
016: public class AlertDefDocumentImpl extends
017: org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements
018: com.bostechcorp.cbesb.alert.x10.AlertDefDocument {
019:
020: public AlertDefDocumentImpl(org.apache.xmlbeans.SchemaType sType) {
021: super (sType);
022: }
023:
024: private static final javax.xml.namespace.QName ALERTDEF$0 = new javax.xml.namespace.QName(
025: "http://cbesb.bostechcorp.com/alert/1.0", "alertDef");
026:
027: /**
028: * Gets the "alertDef" element
029: */
030: public com.bostechcorp.cbesb.alert.x10.AlertDefDocument.AlertDef getAlertDef() {
031: synchronized (monitor()) {
032: check_orphaned();
033: com.bostechcorp.cbesb.alert.x10.AlertDefDocument.AlertDef target = null;
034: target = (com.bostechcorp.cbesb.alert.x10.AlertDefDocument.AlertDef) get_store()
035: .find_element_user(ALERTDEF$0, 0);
036: if (target == null) {
037: return null;
038: }
039: return target;
040: }
041: }
042:
043: /**
044: * Sets the "alertDef" element
045: */
046: public void setAlertDef(
047: com.bostechcorp.cbesb.alert.x10.AlertDefDocument.AlertDef alertDef) {
048: synchronized (monitor()) {
049: check_orphaned();
050: com.bostechcorp.cbesb.alert.x10.AlertDefDocument.AlertDef target = null;
051: target = (com.bostechcorp.cbesb.alert.x10.AlertDefDocument.AlertDef) get_store()
052: .find_element_user(ALERTDEF$0, 0);
053: if (target == null) {
054: target = (com.bostechcorp.cbesb.alert.x10.AlertDefDocument.AlertDef) get_store()
055: .add_element_user(ALERTDEF$0);
056: }
057: target.set(alertDef);
058: }
059: }
060:
061: /**
062: * Appends and returns a new empty "alertDef" element
063: */
064: public com.bostechcorp.cbesb.alert.x10.AlertDefDocument.AlertDef addNewAlertDef() {
065: synchronized (monitor()) {
066: check_orphaned();
067: com.bostechcorp.cbesb.alert.x10.AlertDefDocument.AlertDef target = null;
068: target = (com.bostechcorp.cbesb.alert.x10.AlertDefDocument.AlertDef) get_store()
069: .add_element_user(ALERTDEF$0);
070: return target;
071: }
072: }
073:
074: /**
075: * An XML alertDef(@http://cbesb.bostechcorp.com/alert/1.0).
076: *
077: * This is a complex type.
078: */
079: public static class AlertDefImpl extends
080: org.apache.xmlbeans.impl.values.XmlComplexContentImpl
081: implements
082: com.bostechcorp.cbesb.alert.x10.AlertDefDocument.AlertDef {
083:
084: public AlertDefImpl(org.apache.xmlbeans.SchemaType sType) {
085: super (sType);
086: }
087:
088: private static final javax.xml.namespace.QName ALERTENTRY$0 = new javax.xml.namespace.QName(
089: "http://cbesb.bostechcorp.com/alert/1.0", "alertEntry");
090: private static final javax.xml.namespace.QName NAME$2 = new javax.xml.namespace.QName(
091: "", "name");
092:
093: /**
094: * Gets array of all "alertEntry" elements
095: */
096: public com.bostechcorp.cbesb.alert.x10.AlertEntryType[] getAlertEntryArray() {
097: synchronized (monitor()) {
098: check_orphaned();
099: java.util.List targetList = new java.util.ArrayList();
100: get_store().find_all_element_users(ALERTENTRY$0,
101: targetList);
102: com.bostechcorp.cbesb.alert.x10.AlertEntryType[] result = new com.bostechcorp.cbesb.alert.x10.AlertEntryType[targetList
103: .size()];
104: targetList.toArray(result);
105: return result;
106: }
107: }
108:
109: /**
110: * Gets ith "alertEntry" element
111: */
112: public com.bostechcorp.cbesb.alert.x10.AlertEntryType getAlertEntryArray(
113: int i) {
114: synchronized (monitor()) {
115: check_orphaned();
116: com.bostechcorp.cbesb.alert.x10.AlertEntryType target = null;
117: target = (com.bostechcorp.cbesb.alert.x10.AlertEntryType) get_store()
118: .find_element_user(ALERTENTRY$0, i);
119: if (target == null) {
120: throw new IndexOutOfBoundsException();
121: }
122: return target;
123: }
124: }
125:
126: /**
127: * Returns number of "alertEntry" element
128: */
129: public int sizeOfAlertEntryArray() {
130: synchronized (monitor()) {
131: check_orphaned();
132: return get_store().count_elements(ALERTENTRY$0);
133: }
134: }
135:
136: /**
137: * Sets array of all "alertEntry" element
138: */
139: public void setAlertEntryArray(
140: com.bostechcorp.cbesb.alert.x10.AlertEntryType[] alertEntryArray) {
141: synchronized (monitor()) {
142: check_orphaned();
143: arraySetterHelper(alertEntryArray, ALERTENTRY$0);
144: }
145: }
146:
147: /**
148: * Sets ith "alertEntry" element
149: */
150: public void setAlertEntryArray(
151: int i,
152: com.bostechcorp.cbesb.alert.x10.AlertEntryType alertEntry) {
153: synchronized (monitor()) {
154: check_orphaned();
155: com.bostechcorp.cbesb.alert.x10.AlertEntryType target = null;
156: target = (com.bostechcorp.cbesb.alert.x10.AlertEntryType) get_store()
157: .find_element_user(ALERTENTRY$0, i);
158: if (target == null) {
159: throw new IndexOutOfBoundsException();
160: }
161: target.set(alertEntry);
162: }
163: }
164:
165: /**
166: * Inserts and returns a new empty value (as xml) as the ith "alertEntry" element
167: */
168: public com.bostechcorp.cbesb.alert.x10.AlertEntryType insertNewAlertEntry(
169: int i) {
170: synchronized (monitor()) {
171: check_orphaned();
172: com.bostechcorp.cbesb.alert.x10.AlertEntryType target = null;
173: target = (com.bostechcorp.cbesb.alert.x10.AlertEntryType) get_store()
174: .insert_element_user(ALERTENTRY$0, i);
175: return target;
176: }
177: }
178:
179: /**
180: * Appends and returns a new empty value (as xml) as the last "alertEntry" element
181: */
182: public com.bostechcorp.cbesb.alert.x10.AlertEntryType addNewAlertEntry() {
183: synchronized (monitor()) {
184: check_orphaned();
185: com.bostechcorp.cbesb.alert.x10.AlertEntryType target = null;
186: target = (com.bostechcorp.cbesb.alert.x10.AlertEntryType) get_store()
187: .add_element_user(ALERTENTRY$0);
188: return target;
189: }
190: }
191:
192: /**
193: * Removes the ith "alertEntry" element
194: */
195: public void removeAlertEntry(int i) {
196: synchronized (monitor()) {
197: check_orphaned();
198: get_store().remove_element(ALERTENTRY$0, i);
199: }
200: }
201:
202: /**
203: * Gets the "name" attribute
204: */
205: public java.lang.String getName() {
206: synchronized (monitor()) {
207: check_orphaned();
208: org.apache.xmlbeans.SimpleValue target = null;
209: target = (org.apache.xmlbeans.SimpleValue) get_store()
210: .find_attribute_user(NAME$2);
211: if (target == null) {
212: return null;
213: }
214: return target.getStringValue();
215: }
216: }
217:
218: /**
219: * Gets (as xml) the "name" attribute
220: */
221: public org.apache.xmlbeans.XmlString xgetName() {
222: synchronized (monitor()) {
223: check_orphaned();
224: org.apache.xmlbeans.XmlString target = null;
225: target = (org.apache.xmlbeans.XmlString) get_store()
226: .find_attribute_user(NAME$2);
227: return target;
228: }
229: }
230:
231: /**
232: * True if has "name" attribute
233: */
234: public boolean isSetName() {
235: synchronized (monitor()) {
236: check_orphaned();
237: return get_store().find_attribute_user(NAME$2) != null;
238: }
239: }
240:
241: /**
242: * Sets the "name" attribute
243: */
244: public void setName(java.lang.String name) {
245: synchronized (monitor()) {
246: check_orphaned();
247: org.apache.xmlbeans.SimpleValue target = null;
248: target = (org.apache.xmlbeans.SimpleValue) get_store()
249: .find_attribute_user(NAME$2);
250: if (target == null) {
251: target = (org.apache.xmlbeans.SimpleValue) get_store()
252: .add_attribute_user(NAME$2);
253: }
254: target.setStringValue(name);
255: }
256: }
257:
258: /**
259: * Sets (as xml) the "name" attribute
260: */
261: public void xsetName(org.apache.xmlbeans.XmlString name) {
262: synchronized (monitor()) {
263: check_orphaned();
264: org.apache.xmlbeans.XmlString target = null;
265: target = (org.apache.xmlbeans.XmlString) get_store()
266: .find_attribute_user(NAME$2);
267: if (target == null) {
268: target = (org.apache.xmlbeans.XmlString) get_store()
269: .add_attribute_user(NAME$2);
270: }
271: target.set(name);
272: }
273: }
274:
275: /**
276: * Unsets the "name" attribute
277: */
278: public void unsetName() {
279: synchronized (monitor()) {
280: check_orphaned();
281: get_store().remove_attribute(NAME$2);
282: }
283: }
284: }
285: }
|