/*
 * An XML document type.
 * Localname: EBXMLControlProperties
 * Namespace: http://www.bea.com/wli/control/dynamicProperties
 * Java type: com.bea.wli.control.dynamicProperties.EBXMLControlPropertiesDocument
 *
 * Automatically generated - do not modify.
 */
package com.bea.wli.control.dynamicProperties.impl;
/**
 * A document containing one EBXMLControlProperties(@http://www.bea.com/wli/control/dynamicProperties) element.
 *
 * This is a complex type.
 */
public class EBXMLControlPropertiesDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.bea.wli.control.dynamicProperties.EBXMLControlPropertiesDocument
{
    
    public EBXMLControlPropertiesDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName EBXMLCONTROLPROPERTIES$0 = 
        new javax.xml.namespace.QName("http://www.bea.com/wli/control/dynamicProperties", "EBXMLControlProperties");
    
    
    /**
     * Gets the "EBXMLControlProperties" element
     */
    public com.bea.wli.control.dynamicProperties.EBXMLControlPropertiesDocument.EBXMLControlProperties getEBXMLControlProperties()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.wli.control.dynamicProperties.EBXMLControlPropertiesDocument.EBXMLControlProperties target = null;
            target = (com.bea.wli.control.dynamicProperties.EBXMLControlPropertiesDocument.EBXMLControlProperties)get_store().find_element_user(EBXMLCONTROLPROPERTIES$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "EBXMLControlProperties" element
     */
    public void setEBXMLControlProperties(com.bea.wli.control.dynamicProperties.EBXMLControlPropertiesDocument.EBXMLControlProperties ebxmlControlProperties)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.wli.control.dynamicProperties.EBXMLControlPropertiesDocument.EBXMLControlProperties target = null;
            target = (com.bea.wli.control.dynamicProperties.EBXMLControlPropertiesDocument.EBXMLControlProperties)get_store().find_element_user(EBXMLCONTROLPROPERTIES$0, 0);
            if (target == null)
            {
                target = (com.bea.wli.control.dynamicProperties.EBXMLControlPropertiesDocument.EBXMLControlProperties)get_store().add_element_user(EBXMLCONTROLPROPERTIES$0);
            }
            target.set(ebxmlControlProperties);
        }
    }
    
    /**
     * Appends and returns a new empty "EBXMLControlProperties" element
     */
    public com.bea.wli.control.dynamicProperties.EBXMLControlPropertiesDocument.EBXMLControlProperties addNewEBXMLControlProperties()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.wli.control.dynamicProperties.EBXMLControlPropertiesDocument.EBXMLControlProperties target = null;
            target = (com.bea.wli.control.dynamicProperties.EBXMLControlPropertiesDocument.EBXMLControlProperties)get_store().add_element_user(EBXMLCONTROLPROPERTIES$0);
            return target;
        }
    }
    /**
     * An XML EBXMLControlProperties(@http://www.bea.com/wli/control/dynamicProperties).
     *
     * This is a complex type.
     */
    public static class EBXMLControlPropertiesImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.bea.wli.control.dynamicProperties.EBXMLControlPropertiesDocument.EBXMLControlProperties
    {
        
        public EBXMLControlPropertiesImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName FROM$0 = 
            new javax.xml.namespace.QName("http://www.bea.com/wli/control/dynamicProperties", "from");
        private static final javax.xml.namespace.QName TO$2 = 
            new javax.xml.namespace.QName("http://www.bea.com/wli/control/dynamicProperties", "to");
        
        
        /**
         * Gets the "from" element
         */
        public java.lang.String getFrom()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROM$0, 0);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "from" element
         */
        public org.apache.xmlbeans.XmlString xgetFrom()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FROM$0, 0);
                return target;
            }
        }
        
        /**
         * True if has "from" element
         */
        public boolean isSetFrom()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(FROM$0) != 0;
            }
        }
        
        /**
         * Sets the "from" element
         */
        public void setFrom(java.lang.String from)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROM$0, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(FROM$0);
                }
                target.setStringValue(from);
            }
        }
        
        /**
         * Sets (as xml) the "from" element
         */
        public void xsetFrom(org.apache.xmlbeans.XmlString from)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FROM$0, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(FROM$0);
                }
                target.set(from);
            }
        }
        
        /**
         * Unsets the "from" element
         */
        public void unsetFrom()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(FROM$0, 0);
            }
        }
        
        /**
         * Gets the "to" element
         */
        public java.lang.String getTo()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TO$2, 0);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "to" element
         */
        public org.apache.xmlbeans.XmlString xgetTo()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(TO$2, 0);
                return target;
            }
        }
        
        /**
         * True if has "to" element
         */
        public boolean isSetTo()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(TO$2) != 0;
            }
        }
        
        /**
         * Sets the "to" element
         */
        public void setTo(java.lang.String to)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TO$2, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(TO$2);
                }
                target.setStringValue(to);
            }
        }
        
        /**
         * Sets (as xml) the "to" element
         */
        public void xsetTo(org.apache.xmlbeans.XmlString to)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(TO$2, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(TO$2);
                }
                target.set(to);
            }
        }
        
        /**
         * Unsets the "to" element
         */
        public void unsetTo()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(TO$2, 0);
            }
        }
    }
}
