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