/*
 * An XML document type.
 * Localname: GetCurrentMessage
 * Namespace: http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd
 * Java type: org.activemq.ws.xmlbeans.notification.base.GetCurrentMessageDocument
 *
 * Automatically generated - do not modify.
 */
package org.activemq.ws.xmlbeans.notification.base.impl;
/**
 * A document containing one GetCurrentMessage(@http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd) element.
 *
 * This is a complex type.
 */
public class GetCurrentMessageDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.notification.base.GetCurrentMessageDocument
{
    
    public GetCurrentMessageDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName GETCURRENTMESSAGE$0 = 
        new javax.xml.namespace.QName("http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd", "GetCurrentMessage");
    
    
    /**
     * Gets the "GetCurrentMessage" element
     */
    public org.activemq.ws.xmlbeans.notification.base.GetCurrentMessageDocument.GetCurrentMessage getGetCurrentMessage()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.notification.base.GetCurrentMessageDocument.GetCurrentMessage target = null;
            target = (org.activemq.ws.xmlbeans.notification.base.GetCurrentMessageDocument.GetCurrentMessage)get_store().find_element_user(GETCURRENTMESSAGE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "GetCurrentMessage" element
     */
    public void setGetCurrentMessage(org.activemq.ws.xmlbeans.notification.base.GetCurrentMessageDocument.GetCurrentMessage getCurrentMessage)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.notification.base.GetCurrentMessageDocument.GetCurrentMessage target = null;
            target = (org.activemq.ws.xmlbeans.notification.base.GetCurrentMessageDocument.GetCurrentMessage)get_store().find_element_user(GETCURRENTMESSAGE$0, 0);
            if (target == null)
            {
                target = (org.activemq.ws.xmlbeans.notification.base.GetCurrentMessageDocument.GetCurrentMessage)get_store().add_element_user(GETCURRENTMESSAGE$0);
            }
            target.set(getCurrentMessage);
        }
    }
    
    /**
     * Appends and returns a new empty "GetCurrentMessage" element
     */
    public org.activemq.ws.xmlbeans.notification.base.GetCurrentMessageDocument.GetCurrentMessage addNewGetCurrentMessage()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.notification.base.GetCurrentMessageDocument.GetCurrentMessage target = null;
            target = (org.activemq.ws.xmlbeans.notification.base.GetCurrentMessageDocument.GetCurrentMessage)get_store().add_element_user(GETCURRENTMESSAGE$0);
            return target;
        }
    }
    /**
     * An XML GetCurrentMessage(@http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd).
     *
     * This is a complex type.
     */
    public static class GetCurrentMessageImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.notification.base.GetCurrentMessageDocument.GetCurrentMessage
    {
        
        public GetCurrentMessageImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName TOPIC$0 = 
            new javax.xml.namespace.QName("http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd", "Topic");
        
        
        /**
         * Gets the "Topic" element
         */
        public org.activemq.ws.xmlbeans.notification.base.TopicExpressionType getTopic()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.activemq.ws.xmlbeans.notification.base.TopicExpressionType target = null;
                target = (org.activemq.ws.xmlbeans.notification.base.TopicExpressionType)get_store().find_element_user(TOPIC$0, 0);
                if (target == null)
                {
                    return null;
                }
                return target;
            }
        }
        
        /**
         * Sets the "Topic" element
         */
        public void setTopic(org.activemq.ws.xmlbeans.notification.base.TopicExpressionType topic)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.activemq.ws.xmlbeans.notification.base.TopicExpressionType target = null;
                target = (org.activemq.ws.xmlbeans.notification.base.TopicExpressionType)get_store().find_element_user(TOPIC$0, 0);
                if (target == null)
                {
                    target = (org.activemq.ws.xmlbeans.notification.base.TopicExpressionType)get_store().add_element_user(TOPIC$0);
                }
                target.set(topic);
            }
        }
        
        /**
         * Appends and returns a new empty "Topic" element
         */
        public org.activemq.ws.xmlbeans.notification.base.TopicExpressionType addNewTopic()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.activemq.ws.xmlbeans.notification.base.TopicExpressionType target = null;
                target = (org.activemq.ws.xmlbeans.notification.base.TopicExpressionType)get_store().add_element_user(TOPIC$0);
                return target;
            }
        }
    }
}
