/*
 * An XML document type.
 * Localname: SetTerminationTimeResponse
 * 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.SetTerminationTimeResponseDocument
 *
 * Automatically generated - do not modify.
 */
package org.activemq.ws.xmlbeans.resource.lifetime.impl;
/**
 * A document containing one SetTerminationTimeResponse(@http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd) element.
 *
 * This is a complex type.
 */
public class SetTerminationTimeResponseDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.resource.lifetime.SetTerminationTimeResponseDocument
{
    
    public SetTerminationTimeResponseDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName SETTERMINATIONTIMERESPONSE$0 = 
        new javax.xml.namespace.QName("http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd", "SetTerminationTimeResponse");
    
    
    /**
     * Gets the "SetTerminationTimeResponse" element
     */
    public org.activemq.ws.xmlbeans.resource.lifetime.SetTerminationTimeResponseDocument.SetTerminationTimeResponse getSetTerminationTimeResponse()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.lifetime.SetTerminationTimeResponseDocument.SetTerminationTimeResponse target = null;
            target = (org.activemq.ws.xmlbeans.resource.lifetime.SetTerminationTimeResponseDocument.SetTerminationTimeResponse)get_store().find_element_user(SETTERMINATIONTIMERESPONSE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "SetTerminationTimeResponse" element
     */
    public void setSetTerminationTimeResponse(org.activemq.ws.xmlbeans.resource.lifetime.SetTerminationTimeResponseDocument.SetTerminationTimeResponse setTerminationTimeResponse)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.lifetime.SetTerminationTimeResponseDocument.SetTerminationTimeResponse target = null;
            target = (org.activemq.ws.xmlbeans.resource.lifetime.SetTerminationTimeResponseDocument.SetTerminationTimeResponse)get_store().find_element_user(SETTERMINATIONTIMERESPONSE$0, 0);
            if (target == null)
            {
                target = (org.activemq.ws.xmlbeans.resource.lifetime.SetTerminationTimeResponseDocument.SetTerminationTimeResponse)get_store().add_element_user(SETTERMINATIONTIMERESPONSE$0);
            }
            target.set(setTerminationTimeResponse);
        }
    }
    
    /**
     * Appends and returns a new empty "SetTerminationTimeResponse" element
     */
    public org.activemq.ws.xmlbeans.resource.lifetime.SetTerminationTimeResponseDocument.SetTerminationTimeResponse addNewSetTerminationTimeResponse()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.lifetime.SetTerminationTimeResponseDocument.SetTerminationTimeResponse target = null;
            target = (org.activemq.ws.xmlbeans.resource.lifetime.SetTerminationTimeResponseDocument.SetTerminationTimeResponse)get_store().add_element_user(SETTERMINATIONTIMERESPONSE$0);
            return target;
        }
    }
    /**
     * An XML SetTerminationTimeResponse(@http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd).
     *
     * This is a complex type.
     */
    public static class SetTerminationTimeResponseImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.resource.lifetime.SetTerminationTimeResponseDocument.SetTerminationTimeResponse
    {
        
        public SetTerminationTimeResponseImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName NEWTERMINATIONTIME$0 = 
            new javax.xml.namespace.QName("http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd", "NewTerminationTime");
        private static final javax.xml.namespace.QName CURRENTTIME$2 = 
            new javax.xml.namespace.QName("http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd", "CurrentTime");
        
        
        /**
         * Gets the "NewTerminationTime" element
         */
        public java.util.Calendar getNewTerminationTime()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NEWTERMINATIONTIME$0, 0);
                if (target == null)
                {
                    return null;
                }
                return target.getCalendarValue();
            }
        }
        
        /**
         * Gets (as xml) the "NewTerminationTime" element
         */
        public org.apache.xmlbeans.XmlDateTime xgetNewTerminationTime()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlDateTime target = null;
                target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(NEWTERMINATIONTIME$0, 0);
                return target;
            }
        }
        
        /**
         * Tests for nil "NewTerminationTime" element
         */
        public boolean isNilNewTerminationTime()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlDateTime target = null;
                target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(NEWTERMINATIONTIME$0, 0);
                if (target == null) return false;
                return target.isNil();
            }
        }
        
        /**
         * Sets the "NewTerminationTime" element
         */
        public void setNewTerminationTime(java.util.Calendar newTerminationTime)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(NEWTERMINATIONTIME$0, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(NEWTERMINATIONTIME$0);
                }
                target.setCalendarValue(newTerminationTime);
            }
        }
        
        /**
         * Sets (as xml) the "NewTerminationTime" element
         */
        public void xsetNewTerminationTime(org.apache.xmlbeans.XmlDateTime newTerminationTime)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlDateTime target = null;
                target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(NEWTERMINATIONTIME$0, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlDateTime)get_store().add_element_user(NEWTERMINATIONTIME$0);
                }
                target.set(newTerminationTime);
            }
        }
        
        /**
         * Nils the "NewTerminationTime" element
         */
        public void setNilNewTerminationTime()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlDateTime target = null;
                target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(NEWTERMINATIONTIME$0, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlDateTime)get_store().add_element_user(NEWTERMINATIONTIME$0);
                }
                target.setNil();
            }
        }
        
        /**
         * Gets the "CurrentTime" element
         */
        public java.util.Calendar getCurrentTime()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CURRENTTIME$2, 0);
                if (target == null)
                {
                    return null;
                }
                return target.getCalendarValue();
            }
        }
        
        /**
         * Gets (as xml) the "CurrentTime" element
         */
        public org.apache.xmlbeans.XmlDateTime xgetCurrentTime()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlDateTime target = null;
                target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(CURRENTTIME$2, 0);
                return target;
            }
        }
        
        /**
         * Sets the "CurrentTime" element
         */
        public void setCurrentTime(java.util.Calendar currentTime)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CURRENTTIME$2, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(CURRENTTIME$2);
                }
                target.setCalendarValue(currentTime);
            }
        }
        
        /**
         * Sets (as xml) the "CurrentTime" element
         */
        public void xsetCurrentTime(org.apache.xmlbeans.XmlDateTime currentTime)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlDateTime target = null;
                target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(CURRENTTIME$2, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlDateTime)get_store().add_element_user(CURRENTTIME$2);
                }
                target.set(currentTime);
            }
        }
    }
}
