/*
 * An XML document type.
 * Localname: PublishControlProperties
 * Namespace: http://www.bea.com/wli/control/dynamicProperties
 * Java type: com.bea.wli.control.dynamicProperties.PublishControlPropertiesDocument
 *
 * Automatically generated - do not modify.
 */
package com.bea.wli.control.dynamicProperties.impl;
/**
 * A document containing one PublishControlProperties(@http://www.bea.com/wli/control/dynamicProperties) element.
 *
 * This is a complex type.
 */
public class PublishControlPropertiesDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.bea.wli.control.dynamicProperties.PublishControlPropertiesDocument
{
    
    public PublishControlPropertiesDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName PUBLISHCONTROLPROPERTIES$0 = 
        new javax.xml.namespace.QName("http://www.bea.com/wli/control/dynamicProperties", "PublishControlProperties");
    
    
    /**
     * Gets the "PublishControlProperties" element
     */
    public com.bea.wli.control.dynamicProperties.PublishControlPropertiesDocument.PublishControlProperties getPublishControlProperties()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.wli.control.dynamicProperties.PublishControlPropertiesDocument.PublishControlProperties target = null;
            target = (com.bea.wli.control.dynamicProperties.PublishControlPropertiesDocument.PublishControlProperties)get_store().find_element_user(PUBLISHCONTROLPROPERTIES$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "PublishControlProperties" element
     */
    public void setPublishControlProperties(com.bea.wli.control.dynamicProperties.PublishControlPropertiesDocument.PublishControlProperties publishControlProperties)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.wli.control.dynamicProperties.PublishControlPropertiesDocument.PublishControlProperties target = null;
            target = (com.bea.wli.control.dynamicProperties.PublishControlPropertiesDocument.PublishControlProperties)get_store().find_element_user(PUBLISHCONTROLPROPERTIES$0, 0);
            if (target == null)
            {
                target = (com.bea.wli.control.dynamicProperties.PublishControlPropertiesDocument.PublishControlProperties)get_store().add_element_user(PUBLISHCONTROLPROPERTIES$0);
            }
            target.set(publishControlProperties);
        }
    }
    
    /**
     * Appends and returns a new empty "PublishControlProperties" element
     */
    public com.bea.wli.control.dynamicProperties.PublishControlPropertiesDocument.PublishControlProperties addNewPublishControlProperties()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.wli.control.dynamicProperties.PublishControlPropertiesDocument.PublishControlProperties target = null;
            target = (com.bea.wli.control.dynamicProperties.PublishControlPropertiesDocument.PublishControlProperties)get_store().add_element_user(PUBLISHCONTROLPROPERTIES$0);
            return target;
        }
    }
    /**
     * An XML PublishControlProperties(@http://www.bea.com/wli/control/dynamicProperties).
     *
     * This is a complex type.
     */
    public static class PublishControlPropertiesImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.bea.wli.control.dynamicProperties.PublishControlPropertiesDocument.PublishControlProperties
    {
        
        public PublishControlPropertiesImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName CHANNELNAME$0 = 
            new javax.xml.namespace.QName("http://www.bea.com/wli/control/dynamicProperties", "channel-name");
        private static final javax.xml.namespace.QName MESSAGEMETADATA$2 = 
            new javax.xml.namespace.QName("http://www.bea.com/wli/control/dynamicProperties", "message-metadata");
        
        
        /**
         * Gets the "channel-name" element
         */
        public java.lang.String getChannelName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CHANNELNAME$0, 0);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "channel-name" element
         */
        public org.apache.xmlbeans.XmlString xgetChannelName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(CHANNELNAME$0, 0);
                return target;
            }
        }
        
        /**
         * True if has "channel-name" element
         */
        public boolean isSetChannelName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(CHANNELNAME$0) != 0;
            }
        }
        
        /**
         * Sets the "channel-name" element
         */
        public void setChannelName(java.lang.String channelName)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CHANNELNAME$0, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(CHANNELNAME$0);
                }
                target.setStringValue(channelName);
            }
        }
        
        /**
         * Sets (as xml) the "channel-name" element
         */
        public void xsetChannelName(org.apache.xmlbeans.XmlString channelName)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(CHANNELNAME$0, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(CHANNELNAME$0);
                }
                target.set(channelName);
            }
        }
        
        /**
         * Unsets the "channel-name" element
         */
        public void unsetChannelName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(CHANNELNAME$0, 0);
            }
        }
        
        /**
         * Gets the "message-metadata" element
         */
        public com.bea.wli.control.dynamicProperties.Metadata getMessageMetadata()
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.bea.wli.control.dynamicProperties.Metadata target = null;
                target = (com.bea.wli.control.dynamicProperties.Metadata)get_store().find_element_user(MESSAGEMETADATA$2, 0);
                if (target == null)
                {
                    return null;
                }
                return target;
            }
        }
        
        /**
         * True if has "message-metadata" element
         */
        public boolean isSetMessageMetadata()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(MESSAGEMETADATA$2) != 0;
            }
        }
        
        /**
         * Sets the "message-metadata" element
         */
        public void setMessageMetadata(com.bea.wli.control.dynamicProperties.Metadata messageMetadata)
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.bea.wli.control.dynamicProperties.Metadata target = null;
                target = (com.bea.wli.control.dynamicProperties.Metadata)get_store().find_element_user(MESSAGEMETADATA$2, 0);
                if (target == null)
                {
                    target = (com.bea.wli.control.dynamicProperties.Metadata)get_store().add_element_user(MESSAGEMETADATA$2);
                }
                target.set(messageMetadata);
            }
        }
        
        /**
         * Appends and returns a new empty "message-metadata" element
         */
        public com.bea.wli.control.dynamicProperties.Metadata addNewMessageMetadata()
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.bea.wli.control.dynamicProperties.Metadata target = null;
                target = (com.bea.wli.control.dynamicProperties.Metadata)get_store().add_element_user(MESSAGEMETADATA$2);
                return target;
            }
        }
        
        /**
         * Unsets the "message-metadata" element
         */
        public void unsetMessageMetadata()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(MESSAGEMETADATA$2, 0);
            }
        }
    }
}
