/*
 * An XML document type.
 * Localname: RefToMessageId
 * Namespace: http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd
 * Java type: org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.RefToMessageIdDocument
 *
 * Automatically generated - do not modify.
 */
package org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.impl;
/**
 * A document containing one RefToMessageId(@http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd) element.
 *
 * This is a complex type.
 */
public class RefToMessageIdDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.RefToMessageIdDocument
{
    
    public RefToMessageIdDocumentImpl(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");
    
    
    /**
     * 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);
        }
    }
}
