All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.wildfly.camel.xmlbeans.impl.PurchaseOrderDocumentImpl Maven / Gradle / Ivy

There is a newer version: 12.0.0
Show newest version
/*
 * An XML document type.
 * Localname: purchase-order
 * Namespace: http://camel.wildfly.org/xmlbeans
 * Java type: org.wildfly.camel.xmlbeans.PurchaseOrderDocument
 *
 * Automatically generated - do not modify.
 */
package org.wildfly.camel.xmlbeans.impl;
/**
 * A document containing one purchase-order(@http://camel.wildfly.org/xmlbeans) element.
 *
 * This is a complex type.
 */
public class PurchaseOrderDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.wildfly.camel.xmlbeans.PurchaseOrderDocument
{
    private static final long serialVersionUID = 1L;
    
    public PurchaseOrderDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName PURCHASEORDER$0 = 
        new javax.xml.namespace.QName("http://camel.wildfly.org/xmlbeans", "purchase-order");
    
    
    /**
     * Gets the "purchase-order" element
     */
    public org.wildfly.camel.xmlbeans.PurchaseOrderDocument.PurchaseOrder getPurchaseOrder()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.wildfly.camel.xmlbeans.PurchaseOrderDocument.PurchaseOrder target = null;
            target = (org.wildfly.camel.xmlbeans.PurchaseOrderDocument.PurchaseOrder)get_store().find_element_user(PURCHASEORDER$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "purchase-order" element
     */
    public void setPurchaseOrder(org.wildfly.camel.xmlbeans.PurchaseOrderDocument.PurchaseOrder purchaseOrder)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.wildfly.camel.xmlbeans.PurchaseOrderDocument.PurchaseOrder target = null;
            target = (org.wildfly.camel.xmlbeans.PurchaseOrderDocument.PurchaseOrder)get_store().find_element_user(PURCHASEORDER$0, 0);
            if (target == null)
            {
                target = (org.wildfly.camel.xmlbeans.PurchaseOrderDocument.PurchaseOrder)get_store().add_element_user(PURCHASEORDER$0);
            }
            target.set(purchaseOrder);
        }
    }
    
    /**
     * Appends and returns a new empty "purchase-order" element
     */
    public org.wildfly.camel.xmlbeans.PurchaseOrderDocument.PurchaseOrder addNewPurchaseOrder()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.wildfly.camel.xmlbeans.PurchaseOrderDocument.PurchaseOrder target = null;
            target = (org.wildfly.camel.xmlbeans.PurchaseOrderDocument.PurchaseOrder)get_store().add_element_user(PURCHASEORDER$0);
            return target;
        }
    }
    /**
     * An XML purchase-order(@http://camel.wildfly.org/xmlbeans).
     *
     * This is a complex type.
     */
    public static class PurchaseOrderImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.wildfly.camel.xmlbeans.PurchaseOrderDocument.PurchaseOrder
    {
        private static final long serialVersionUID = 1L;
        
        public PurchaseOrderImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName CUSTOMER$0 = 
            new javax.xml.namespace.QName("", "customer");
        private static final javax.xml.namespace.QName LINEITEM$2 = 
            new javax.xml.namespace.QName("", "line-item");
        
        
        /**
         * Gets the "customer" element
         */
        public org.wildfly.camel.xmlbeans.Customer getCustomer()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.wildfly.camel.xmlbeans.Customer target = null;
                target = (org.wildfly.camel.xmlbeans.Customer)get_store().find_element_user(CUSTOMER$0, 0);
                if (target == null)
                {
                    return null;
                }
                return target;
            }
        }
        
        /**
         * Sets the "customer" element
         */
        public void setCustomer(org.wildfly.camel.xmlbeans.Customer customer)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.wildfly.camel.xmlbeans.Customer target = null;
                target = (org.wildfly.camel.xmlbeans.Customer)get_store().find_element_user(CUSTOMER$0, 0);
                if (target == null)
                {
                    target = (org.wildfly.camel.xmlbeans.Customer)get_store().add_element_user(CUSTOMER$0);
                }
                target.set(customer);
            }
        }
        
        /**
         * Appends and returns a new empty "customer" element
         */
        public org.wildfly.camel.xmlbeans.Customer addNewCustomer()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.wildfly.camel.xmlbeans.Customer target = null;
                target = (org.wildfly.camel.xmlbeans.Customer)get_store().add_element_user(CUSTOMER$0);
                return target;
            }
        }
        
        /**
         * Gets array of all "line-item" elements
         */
        public org.wildfly.camel.xmlbeans.LineItem[] getLineItemArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                java.util.List targetList = new java.util.ArrayList();
                get_store().find_all_element_users(LINEITEM$2, targetList);
                org.wildfly.camel.xmlbeans.LineItem[] result = new org.wildfly.camel.xmlbeans.LineItem[targetList.size()];
                targetList.toArray(result);
                return result;
            }
        }
        
        /**
         * Gets ith "line-item" element
         */
        public org.wildfly.camel.xmlbeans.LineItem getLineItemArray(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.wildfly.camel.xmlbeans.LineItem target = null;
                target = (org.wildfly.camel.xmlbeans.LineItem)get_store().find_element_user(LINEITEM$2, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                return target;
            }
        }
        
        /**
         * Returns number of "line-item" element
         */
        public int sizeOfLineItemArray()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(LINEITEM$2);
            }
        }
        
        /**
         * Sets array of all "line-item" element
         */
        public void setLineItemArray(org.wildfly.camel.xmlbeans.LineItem[] lineItemArray)
        {
            synchronized (monitor())
            {
                check_orphaned();
                arraySetterHelper(lineItemArray, LINEITEM$2);
            }
        }
        
        /**
         * Sets ith "line-item" element
         */
        public void setLineItemArray(int i, org.wildfly.camel.xmlbeans.LineItem lineItem)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.wildfly.camel.xmlbeans.LineItem target = null;
                target = (org.wildfly.camel.xmlbeans.LineItem)get_store().find_element_user(LINEITEM$2, i);
                if (target == null)
                {
                    throw new IndexOutOfBoundsException();
                }
                target.set(lineItem);
            }
        }
        
        /**
         * Inserts and returns a new empty value (as xml) as the ith "line-item" element
         */
        public org.wildfly.camel.xmlbeans.LineItem insertNewLineItem(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.wildfly.camel.xmlbeans.LineItem target = null;
                target = (org.wildfly.camel.xmlbeans.LineItem)get_store().insert_element_user(LINEITEM$2, i);
                return target;
            }
        }
        
        /**
         * Appends and returns a new empty value (as xml) as the last "line-item" element
         */
        public org.wildfly.camel.xmlbeans.LineItem addNewLineItem()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.wildfly.camel.xmlbeans.LineItem target = null;
                target = (org.wildfly.camel.xmlbeans.LineItem)get_store().add_element_user(LINEITEM$2);
                return target;
            }
        }
        
        /**
         * Removes the ith "line-item" element
         */
        public void removeLineItem(int i)
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(LINEITEM$2, i);
            }
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy