001: /*
002: * An XML document type.
003: * Localname: log4jList
004: * Namespace: http://cbesb.bostechcorp.com/logging/1.0
005: * Java type: com.bostechcorp.cbesb.logging.x10.Log4JListDocument
006: *
007: * Automatically generated - do not modify.
008: */
009: package com.bostechcorp.cbesb.logging.x10.impl;
010:
011: /**
012: * A document containing one log4jList(@http://cbesb.bostechcorp.com/logging/1.0) element.
013: *
014: * This is a complex type.
015: */
016: public class Log4JListDocumentImpl extends
017: org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements
018: com.bostechcorp.cbesb.logging.x10.Log4JListDocument {
019:
020: public Log4JListDocumentImpl(org.apache.xmlbeans.SchemaType sType) {
021: super (sType);
022: }
023:
024: private static final javax.xml.namespace.QName LOG4JLIST$0 = new javax.xml.namespace.QName(
025: "http://cbesb.bostechcorp.com/logging/1.0", "log4jList");
026:
027: /**
028: * Gets the "log4jList" element
029: */
030: public com.bostechcorp.cbesb.logging.x10.Log4JListDocument.Log4JList getLog4JList() {
031: synchronized (monitor()) {
032: check_orphaned();
033: com.bostechcorp.cbesb.logging.x10.Log4JListDocument.Log4JList target = null;
034: target = (com.bostechcorp.cbesb.logging.x10.Log4JListDocument.Log4JList) get_store()
035: .find_element_user(LOG4JLIST$0, 0);
036: if (target == null) {
037: return null;
038: }
039: return target;
040: }
041: }
042:
043: /**
044: * Sets the "log4jList" element
045: */
046: public void setLog4JList(
047: com.bostechcorp.cbesb.logging.x10.Log4JListDocument.Log4JList log4JList) {
048: synchronized (monitor()) {
049: check_orphaned();
050: com.bostechcorp.cbesb.logging.x10.Log4JListDocument.Log4JList target = null;
051: target = (com.bostechcorp.cbesb.logging.x10.Log4JListDocument.Log4JList) get_store()
052: .find_element_user(LOG4JLIST$0, 0);
053: if (target == null) {
054: target = (com.bostechcorp.cbesb.logging.x10.Log4JListDocument.Log4JList) get_store()
055: .add_element_user(LOG4JLIST$0);
056: }
057: target.set(log4JList);
058: }
059: }
060:
061: /**
062: * Appends and returns a new empty "log4jList" element
063: */
064: public com.bostechcorp.cbesb.logging.x10.Log4JListDocument.Log4JList addNewLog4JList() {
065: synchronized (monitor()) {
066: check_orphaned();
067: com.bostechcorp.cbesb.logging.x10.Log4JListDocument.Log4JList target = null;
068: target = (com.bostechcorp.cbesb.logging.x10.Log4JListDocument.Log4JList) get_store()
069: .add_element_user(LOG4JLIST$0);
070: return target;
071: }
072: }
073:
074: /**
075: * An XML log4jList(@http://cbesb.bostechcorp.com/logging/1.0).
076: *
077: * This is a complex type.
078: */
079: public static class Log4JListImpl extends
080: org.apache.xmlbeans.impl.values.XmlComplexContentImpl
081: implements
082: com.bostechcorp.cbesb.logging.x10.Log4JListDocument.Log4JList {
083:
084: public Log4JListImpl(org.apache.xmlbeans.SchemaType sType) {
085: super (sType);
086: }
087:
088: private static final javax.xml.namespace.QName ITEM$0 = new javax.xml.namespace.QName(
089: "http://cbesb.bostechcorp.com/logging/1.0", "item");
090:
091: /**
092: * Gets array of all "item" elements
093: */
094: public com.bostechcorp.cbesb.logging.x10.ItemType[] getItemArray() {
095: synchronized (monitor()) {
096: check_orphaned();
097: java.util.List targetList = new java.util.ArrayList();
098: get_store().find_all_element_users(ITEM$0, targetList);
099: com.bostechcorp.cbesb.logging.x10.ItemType[] result = new com.bostechcorp.cbesb.logging.x10.ItemType[targetList
100: .size()];
101: targetList.toArray(result);
102: return result;
103: }
104: }
105:
106: /**
107: * Gets ith "item" element
108: */
109: public com.bostechcorp.cbesb.logging.x10.ItemType getItemArray(
110: int i) {
111: synchronized (monitor()) {
112: check_orphaned();
113: com.bostechcorp.cbesb.logging.x10.ItemType target = null;
114: target = (com.bostechcorp.cbesb.logging.x10.ItemType) get_store()
115: .find_element_user(ITEM$0, i);
116: if (target == null) {
117: throw new IndexOutOfBoundsException();
118: }
119: return target;
120: }
121: }
122:
123: /**
124: * Returns number of "item" element
125: */
126: public int sizeOfItemArray() {
127: synchronized (monitor()) {
128: check_orphaned();
129: return get_store().count_elements(ITEM$0);
130: }
131: }
132:
133: /**
134: * Sets array of all "item" element
135: */
136: public void setItemArray(
137: com.bostechcorp.cbesb.logging.x10.ItemType[] itemArray) {
138: synchronized (monitor()) {
139: check_orphaned();
140: arraySetterHelper(itemArray, ITEM$0);
141: }
142: }
143:
144: /**
145: * Sets ith "item" element
146: */
147: public void setItemArray(int i,
148: com.bostechcorp.cbesb.logging.x10.ItemType item) {
149: synchronized (monitor()) {
150: check_orphaned();
151: com.bostechcorp.cbesb.logging.x10.ItemType target = null;
152: target = (com.bostechcorp.cbesb.logging.x10.ItemType) get_store()
153: .find_element_user(ITEM$0, i);
154: if (target == null) {
155: throw new IndexOutOfBoundsException();
156: }
157: target.set(item);
158: }
159: }
160:
161: /**
162: * Inserts and returns a new empty value (as xml) as the ith "item" element
163: */
164: public com.bostechcorp.cbesb.logging.x10.ItemType insertNewItem(
165: int i) {
166: synchronized (monitor()) {
167: check_orphaned();
168: com.bostechcorp.cbesb.logging.x10.ItemType target = null;
169: target = (com.bostechcorp.cbesb.logging.x10.ItemType) get_store()
170: .insert_element_user(ITEM$0, i);
171: return target;
172: }
173: }
174:
175: /**
176: * Appends and returns a new empty value (as xml) as the last "item" element
177: */
178: public com.bostechcorp.cbesb.logging.x10.ItemType addNewItem() {
179: synchronized (monitor()) {
180: check_orphaned();
181: com.bostechcorp.cbesb.logging.x10.ItemType target = null;
182: target = (com.bostechcorp.cbesb.logging.x10.ItemType) get_store()
183: .add_element_user(ITEM$0);
184: return target;
185: }
186: }
187:
188: /**
189: * Removes the ith "item" element
190: */
191: public void removeItem(int i) {
192: synchronized (monitor()) {
193: check_orphaned();
194: get_store().remove_element(ITEM$0, i);
195: }
196: }
197: }
198: }
|