/*
 * An XML document type.
 * Localname: ConsumerReference
 * 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.ConsumerReferenceDocument
 *
 * Automatically generated - do not modify.
 */
package org.activemq.ws.xmlbeans.notification.base.impl;
/**
 * A document containing one ConsumerReference(@http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd) element.
 *
 * This is a complex type.
 */
public class ConsumerReferenceDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.notification.base.ConsumerReferenceDocument
{
    
    public ConsumerReferenceDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName CONSUMERREFERENCE$0 = 
        new javax.xml.namespace.QName("http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd", "ConsumerReference");
    
    
    /**
     * Gets the "ConsumerReference" element
     */
    public org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType getConsumerReference()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType target = null;
            target = (org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType)get_store().find_element_user(CONSUMERREFERENCE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "ConsumerReference" element
     */
    public void setConsumerReference(org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType consumerReference)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType target = null;
            target = (org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType)get_store().find_element_user(CONSUMERREFERENCE$0, 0);
            if (target == null)
            {
                target = (org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType)get_store().add_element_user(CONSUMERREFERENCE$0);
            }
            target.set(consumerReference);
        }
    }
    
    /**
     * Appends and returns a new empty "ConsumerReference" element
     */
    public org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType addNewConsumerReference()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType target = null;
            target = (org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType)get_store().add_element_user(CONSUMERREFERENCE$0);
            return target;
        }
    }
}
