/*
 * An XML document type.
 * Localname: StatusRequest
 * Namespace: http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd
 * Java type: org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusRequestDocument
 *
 * Automatically generated - do not modify.
 */
package org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.impl;
/**
 * A document containing one StatusRequest(@http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd) element.
 *
 * This is a complex type.
 */
public class StatusRequestDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusRequestDocument
{
    
    public StatusRequestDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName STATUSREQUEST$0 = 
        new javax.xml.namespace.QName("http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd", "StatusRequest");
    
    
    /**
     * Gets the "StatusRequest" element
     */
    public org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusRequestDocument.StatusRequest getStatusRequest()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusRequestDocument.StatusRequest target = null;
            target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusRequestDocument.StatusRequest)get_store().find_element_user(STATUSREQUEST$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "StatusRequest" element
     */
    public void setStatusRequest(org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusRequestDocument.StatusRequest statusRequest)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusRequestDocument.StatusRequest target = null;
            target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusRequestDocument.StatusRequest)get_store().find_element_user(STATUSREQUEST$0, 0);
            if (target == null)
            {
                target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusRequestDocument.StatusRequest)get_store().add_element_user(STATUSREQUEST$0);
            }
            target.set(statusRequest);
        }
    }
    
    /**
     * Appends and returns a new empty "StatusRequest" element
     */
    public org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusRequestDocument.StatusRequest addNewStatusRequest()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusRequestDocument.StatusRequest target = null;
            target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusRequestDocument.StatusRequest)get_store().add_element_user(STATUSREQUEST$0);
            return target;
        }
    }
    /**
     * An XML StatusRequest(@http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd).
     *
     * This is a complex type.
     */
    public static class StatusRequestImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusRequestDocument.StatusRequest
    {
        
        public StatusRequestImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName REFTOMESSAGEID$0 = 
            new javax.xml.namespace.QName("http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd", "RefToMessageId");
        private static final javax.xml.namespace.QName ID$2 = 
            new javax.xml.namespace.QName("http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd", "id");
        private static final javax.xml.namespace.QName VERSION$4 = 
            new javax.xml.namespace.QName("http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd", "version");
        
        
        /**
         * Gets the "RefToMessageId" element
         */
        public java.lang.String getRefToMessageId()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REFTOMESSAGEID$0, 0);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "RefToMessageId" element
         */
        public org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString xgetRefToMessageId()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString target = null;
                target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString)get_store().find_element_user(REFTOMESSAGEID$0, 0);
                return target;
            }
        }
        
        /**
         * Sets the "RefToMessageId" element
         */
        public void setRefToMessageId(java.lang.String refToMessageId)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REFTOMESSAGEID$0, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(REFTOMESSAGEID$0);
                }
                target.setStringValue(refToMessageId);
            }
        }
        
        /**
         * Sets (as xml) the "RefToMessageId" element
         */
        public void xsetRefToMessageId(org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString refToMessageId)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString target = null;
                target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString)get_store().find_element_user(REFTOMESSAGEID$0, 0);
                if (target == null)
                {
                    target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString)get_store().add_element_user(REFTOMESSAGEID$0);
                }
                target.set(refToMessageId);
            }
        }
        
        /**
         * Gets the "id" attribute
         */
        public java.lang.String getId()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ID$2);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "id" attribute
         */
        public org.apache.xmlbeans.XmlID xgetId()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlID target = null;
                target = (org.apache.xmlbeans.XmlID)get_store().find_attribute_user(ID$2);
                return target;
            }
        }
        
        /**
         * True if has "id" attribute
         */
        public boolean isSetId()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(ID$2) != null;
            }
        }
        
        /**
         * Sets the "id" attribute
         */
        public void setId(java.lang.String id)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ID$2);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ID$2);
                }
                target.setStringValue(id);
            }
        }
        
        /**
         * Sets (as xml) the "id" attribute
         */
        public void xsetId(org.apache.xmlbeans.XmlID id)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlID target = null;
                target = (org.apache.xmlbeans.XmlID)get_store().find_attribute_user(ID$2);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlID)get_store().add_attribute_user(ID$2);
                }
                target.set(id);
            }
        }
        
        /**
         * Unsets the "id" attribute
         */
        public void unsetId()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(ID$2);
            }
        }
        
        /**
         * Gets the "version" attribute
         */
        public java.lang.String getVersion()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(VERSION$4);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "version" attribute
         */
        public org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString xgetVersion()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString target = null;
                target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString)get_store().find_attribute_user(VERSION$4);
                return target;
            }
        }
        
        /**
         * Sets the "version" attribute
         */
        public void setVersion(java.lang.String version)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(VERSION$4);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(VERSION$4);
                }
                target.setStringValue(version);
            }
        }
        
        /**
         * Sets (as xml) the "version" attribute
         */
        public void xsetVersion(org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString version)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString target = null;
                target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString)get_store().find_attribute_user(VERSION$4);
                if (target == null)
                {
                    target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.NonEmptyString)get_store().add_attribute_user(VERSION$4);
                }
                target.set(version);
            }
        }
    }
}
