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

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

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

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


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

    /**
     * Sets the "FaultTo" element
     */
    public void setFaultTo(org.codehaus.activemq.ws.schema.addressing.EndpointReferenceType faultTo) {
        synchronized (monitor()) {
            check_orphaned();
            org.codehaus.activemq.ws.schema.addressing.EndpointReferenceType target = null;
            target = (org.codehaus.activemq.ws.schema.addressing.EndpointReferenceType) get_store().find_element_user(FAULTTO$0, 0);
            if (target == null) {
                target = (org.codehaus.activemq.ws.schema.addressing.EndpointReferenceType) get_store().add_element_user(FAULTTO$0);
            }
            target.set(faultTo);
        }
    }

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