/*
 * An XML document type.
 * Localname: SequenceNumber
 * Namespace: http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd
 * Java type: org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.SequenceNumberDocument
 *
 * Automatically generated - do not modify.
 */
package org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.impl;
/**
 * A document containing one SequenceNumber(@http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd) element.
 *
 * This is a complex type.
 */
public class SequenceNumberDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.SequenceNumberDocument
{
    
    public SequenceNumberDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName SEQUENCENUMBER$0 = 
        new javax.xml.namespace.QName("http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd", "SequenceNumber");
    
    
    /**
     * Gets the "SequenceNumber" element
     */
    public org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.SequenceNumberType getSequenceNumber()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.SequenceNumberType target = null;
            target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.SequenceNumberType)get_store().find_element_user(SEQUENCENUMBER$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "SequenceNumber" element
     */
    public void setSequenceNumber(org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.SequenceNumberType sequenceNumber)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.SequenceNumberType target = null;
            target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.SequenceNumberType)get_store().find_element_user(SEQUENCENUMBER$0, 0);
            if (target == null)
            {
                target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.SequenceNumberType)get_store().add_element_user(SEQUENCENUMBER$0);
            }
            target.set(sequenceNumber);
        }
    }
    
    /**
     * Appends and returns a new empty "SequenceNumber" element
     */
    public org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.SequenceNumberType addNewSequenceNumber()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.SequenceNumberType target = null;
            target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.SequenceNumberType)get_store().add_element_user(SEQUENCENUMBER$0);
            return target;
        }
    }
}
