/*
 * An XML document type.
 * Localname: MessageID
 * Namespace: http://schemas.xmlsoap.org/ws/2004/08/addressing
 * Java type: org.codehaus.activemq.ws.schema.addressing.MessageIDDocument
 *
 * Automatically generated - do not modify.
 */
package org.codehaus.activemq.ws.schema.addressing.impl;

/**
 * A document containing one MessageID(@http://schemas.xmlsoap.org/ws/2004/08/addressing) element.
 * <p/>
 * This is a complex type.
 */
public class MessageIDDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.codehaus.activemq.ws.schema.addressing.MessageIDDocument {

    public MessageIDDocumentImpl(org.apache.xmlbeans.SchemaType sType) {
        super(sType);
    }

    private static final javax.xml.namespace.QName MESSAGEID$0 =
            new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2004/08/addressing", "MessageID");


    /**
     * Gets the "MessageID" element
     */
    public org.codehaus.activemq.ws.schema.addressing.AttributedURI getMessageID() {
        synchronized (monitor()) {
            check_orphaned();
            org.codehaus.activemq.ws.schema.addressing.AttributedURI target = null;
            target = (org.codehaus.activemq.ws.schema.addressing.AttributedURI) get_store().find_element_user(MESSAGEID$0, 0);
            if (target == null) {
                return null;
            }
            return target;
        }
    }

    /**
     * Sets the "MessageID" element
     */
    public void setMessageID(org.codehaus.activemq.ws.schema.addressing.AttributedURI messageID) {
        synchronized (monitor()) {
            check_orphaned();
            org.codehaus.activemq.ws.schema.addressing.AttributedURI target = null;
            target = (org.codehaus.activemq.ws.schema.addressing.AttributedURI) get_store().find_element_user(MESSAGEID$0, 0);
            if (target == null) {
                target = (org.codehaus.activemq.ws.schema.addressing.AttributedURI) get_store().add_element_user(MESSAGEID$0);
            }
            target.set(messageID);
        }
    }

    /**
     * Appends and returns a new empty "MessageID" element
     */
    public org.codehaus.activemq.ws.schema.addressing.AttributedURI addNewMessageID() {
        synchronized (monitor()) {
            check_orphaned();
            org.codehaus.activemq.ws.schema.addressing.AttributedURI target = null;
            target = (org.codehaus.activemq.ws.schema.addressing.AttributedURI) get_store().add_element_user(MESSAGEID$0);
            return target;
        }
    }
}
