/*
 * XML Type:  sequenceNumber.type
 * Namespace: http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd
 * Java type: org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.SequenceNumberType
 *
 * Automatically generated - do not modify.
 */
package org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.impl;
/**
 * An XML sequenceNumber.type(@http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd).
 *
 * This is an atomic type that is a restriction of org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.SequenceNumberType.
 */
public class SequenceNumberTypeImpl extends org.apache.xmlbeans.impl.values.JavaIntegerHolderEx implements org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.SequenceNumberType
{
    
    public SequenceNumberTypeImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType, true);
    }
    
    protected SequenceNumberTypeImpl(org.apache.xmlbeans.SchemaType sType, boolean b)
    {
        super(sType, b);
    }
    
    private static final javax.xml.namespace.QName STATUS$0 = 
        new javax.xml.namespace.QName("http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd", "status");
    
    
    /**
     * Gets the "status" attribute
     */
    public org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusType.Enum getStatus()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STATUS$0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(STATUS$0);
            }
            if (target == null)
            {
                return null;
            }
            return (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusType.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "status" attribute
     */
    public org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusType xgetStatus()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusType target = null;
            target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusType)get_store().find_attribute_user(STATUS$0);
            if (target == null)
            {
                target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusType)get_default_attribute_value(STATUS$0);
            }
            return target;
        }
    }
    
    /**
     * True if has "status" attribute
     */
    public boolean isSetStatus()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(STATUS$0) != null;
        }
    }
    
    /**
     * Sets the "status" attribute
     */
    public void setStatus(org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusType.Enum status)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STATUS$0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(STATUS$0);
            }
            target.setEnumValue(status);
        }
    }
    
    /**
     * Sets (as xml) the "status" attribute
     */
    public void xsetStatus(org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusType status)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusType target = null;
            target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusType)get_store().find_attribute_user(STATUS$0);
            if (target == null)
            {
                target = (org.oasisOpen.committees.ebxmlMsg.schema.msgHeader20.StatusType)get_store().add_attribute_user(STATUS$0);
            }
            target.set(status);
        }
    }
    
    /**
     * Unsets the "status" attribute
     */
    public void unsetStatus()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(STATUS$0);
        }
    }
}
