/*
 * An XML document type.
 * Localname: Update
 * Namespace: http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd
 * Java type: org.activemq.ws.xmlbeans.resource.properties.UpdateDocument
 *
 * Automatically generated - do not modify.
 */
package org.activemq.ws.xmlbeans.resource.properties.impl;
/**
 * A document containing one Update(@http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd) element.
 *
 * This is a complex type.
 */
public class UpdateDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.resource.properties.UpdateDocument
{
    
    public UpdateDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName UPDATE$0 = 
        new javax.xml.namespace.QName("http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd", "Update");
    
    
    /**
     * Gets the "Update" element
     */
    public org.activemq.ws.xmlbeans.resource.properties.UpdateType getUpdate()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.properties.UpdateType target = null;
            target = (org.activemq.ws.xmlbeans.resource.properties.UpdateType)get_store().find_element_user(UPDATE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "Update" element
     */
    public void setUpdate(org.activemq.ws.xmlbeans.resource.properties.UpdateType update)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.properties.UpdateType target = null;
            target = (org.activemq.ws.xmlbeans.resource.properties.UpdateType)get_store().find_element_user(UPDATE$0, 0);
            if (target == null)
            {
                target = (org.activemq.ws.xmlbeans.resource.properties.UpdateType)get_store().add_element_user(UPDATE$0);
            }
            target.set(update);
        }
    }
    
    /**
     * Appends and returns a new empty "Update" element
     */
    public org.activemq.ws.xmlbeans.resource.properties.UpdateType addNewUpdate()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.properties.UpdateType target = null;
            target = (org.activemq.ws.xmlbeans.resource.properties.UpdateType)get_store().add_element_user(UPDATE$0);
            return target;
        }
    }
}
