/*
 * An XML document type.
 * Localname: PortReference
 * Namespace: http://schemas.xmlsoap.org/ws/2002/07/utility
 * Java type: org.xmlsoap.schemas.ws.x2002.x07.utility.PortReferenceDocument
 *
 * Automatically generated - do not modify.
 */
package org.xmlsoap.schemas.ws.x2002.x07.utility.impl;

/**
 * A document containing one PortReference(@http://schemas.xmlsoap.org/ws/2002/07/utility) element.
 * <p/>
 * This is a complex type.
 */
public class PortReferenceDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.xmlsoap.schemas.ws.x2002.x07.utility.PortReferenceDocument {

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

    private static final javax.xml.namespace.QName PORTREFERENCE$0 =
            new javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2002/07/utility", "PortReference");


    /**
     * Gets the "PortReference" element
     */
    public org.xmlsoap.schemas.ws.x2002.x07.utility.PortReferenceType getPortReference() {
        synchronized (monitor()) {
            check_orphaned();
            org.xmlsoap.schemas.ws.x2002.x07.utility.PortReferenceType target = null;
            target = (org.xmlsoap.schemas.ws.x2002.x07.utility.PortReferenceType) get_store().find_element_user(PORTREFERENCE$0, 0);
            if (target == null) {
                return null;
            }
            return target;
        }
    }

    /**
     * Sets the "PortReference" element
     */
    public void setPortReference(org.xmlsoap.schemas.ws.x2002.x07.utility.PortReferenceType portReference) {
        synchronized (monitor()) {
            check_orphaned();
            org.xmlsoap.schemas.ws.x2002.x07.utility.PortReferenceType target = null;
            target = (org.xmlsoap.schemas.ws.x2002.x07.utility.PortReferenceType) get_store().find_element_user(PORTREFERENCE$0, 0);
            if (target == null) {
                target = (org.xmlsoap.schemas.ws.x2002.x07.utility.PortReferenceType) get_store().add_element_user(PORTREFERENCE$0);
            }
            target.set(portReference);
        }
    }

    /**
     * Appends and returns a new empty "PortReference" element
     */
    public org.xmlsoap.schemas.ws.x2002.x07.utility.PortReferenceType addNewPortReference() {
        synchronized (monitor()) {
            check_orphaned();
            org.xmlsoap.schemas.ws.x2002.x07.utility.PortReferenceType target = null;
            target = (org.xmlsoap.schemas.ws.x2002.x07.utility.PortReferenceType) get_store().add_element_user(PORTREFERENCE$0);
            return target;
        }
    }
}
