/*
 * An XML document type.
 * Localname: EndpointReference
 * Namespace: http://schemas.xmlsoap.org/ws/2003/03/addressing
 * Java type: org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceDocument
 *
 * Automatically generated - do not modify.
 */
package org.activemq.ws.xmlbeans.addressing.v2003_03.impl;
/**
 * A document containing one EndpointReference(@http://schemas.xmlsoap.org/ws/2003/03/addressing) element.
 *
 * This is a complex type.
 */
public class EndpointReferenceDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceDocument
{
    
    public EndpointReferenceDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName ENDPOINTREFERENCE$0 = 
        new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2003/03/addressing", "EndpointReference");
    
    
    /**
     * Gets the "EndpointReference" element
     */
    public org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType getEndpointReference()
    {
        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(ENDPOINTREFERENCE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "EndpointReference" element
     */
    public void setEndpointReference(org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType endpointReference)
    {
        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(ENDPOINTREFERENCE$0, 0);
            if (target == null)
            {
                target = (org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType)get_store().add_element_user(ENDPOINTREFERENCE$0);
            }
            target.set(endpointReference);
        }
    }
    
    /**
     * Appends and returns a new empty "EndpointReference" element
     */
    public org.activemq.ws.xmlbeans.addressing.v2003_03.EndpointReferenceType addNewEndpointReference()
    {
        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(ENDPOINTREFERENCE$0);
            return target;
        }
    }
}
