/*
 * An XML document type.
 * Localname: ScheduledResourceTerminationRP
 * 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.ScheduledResourceTerminationRPDocument
 *
 * Automatically generated - do not modify.
 */
package org.activemq.ws.xmlbeans.resource.lifetime.impl;
/**
 * A document containing one ScheduledResourceTerminationRP(@http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd) element.
 *
 * This is a complex type.
 */
public class ScheduledResourceTerminationRPDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.resource.lifetime.ScheduledResourceTerminationRPDocument
{
    
    public ScheduledResourceTerminationRPDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName SCHEDULEDRESOURCETERMINATIONRP$0 = 
        new javax.xml.namespace.QName("http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd", "ScheduledResourceTerminationRP");
    
    
    /**
     * Gets the "ScheduledResourceTerminationRP" element
     */
    public org.activemq.ws.xmlbeans.resource.lifetime.ScheduledResourceTerminationRPDocument.ScheduledResourceTerminationRP getScheduledResourceTerminationRP()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.lifetime.ScheduledResourceTerminationRPDocument.ScheduledResourceTerminationRP target = null;
            target = (org.activemq.ws.xmlbeans.resource.lifetime.ScheduledResourceTerminationRPDocument.ScheduledResourceTerminationRP)get_store().find_element_user(SCHEDULEDRESOURCETERMINATIONRP$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "ScheduledResourceTerminationRP" element
     */
    public void setScheduledResourceTerminationRP(org.activemq.ws.xmlbeans.resource.lifetime.ScheduledResourceTerminationRPDocument.ScheduledResourceTerminationRP scheduledResourceTerminationRP)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.lifetime.ScheduledResourceTerminationRPDocument.ScheduledResourceTerminationRP target = null;
            target = (org.activemq.ws.xmlbeans.resource.lifetime.ScheduledResourceTerminationRPDocument.ScheduledResourceTerminationRP)get_store().find_element_user(SCHEDULEDRESOURCETERMINATIONRP$0, 0);
            if (target == null)
            {
                target = (org.activemq.ws.xmlbeans.resource.lifetime.ScheduledResourceTerminationRPDocument.ScheduledResourceTerminationRP)get_store().add_element_user(SCHEDULEDRESOURCETERMINATIONRP$0);
            }
            target.set(scheduledResourceTerminationRP);
        }
    }
    
    /**
     * Appends and returns a new empty "ScheduledResourceTerminationRP" element
     */
    public org.activemq.ws.xmlbeans.resource.lifetime.ScheduledResourceTerminationRPDocument.ScheduledResourceTerminationRP addNewScheduledResourceTerminationRP()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.activemq.ws.xmlbeans.resource.lifetime.ScheduledResourceTerminationRPDocument.ScheduledResourceTerminationRP target = null;
            target = (org.activemq.ws.xmlbeans.resource.lifetime.ScheduledResourceTerminationRPDocument.ScheduledResourceTerminationRP)get_store().add_element_user(SCHEDULEDRESOURCETERMINATIONRP$0);
            return target;
        }
    }
    /**
     * An XML ScheduledResourceTerminationRP(@http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd).
     *
     * This is a complex type.
     */
    public static class ScheduledResourceTerminationRPImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.activemq.ws.xmlbeans.resource.lifetime.ScheduledResourceTerminationRPDocument.ScheduledResourceTerminationRP
    {
        
        public ScheduledResourceTerminationRPImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName CURRENTTIME$0 = 
            new javax.xml.namespace.QName("http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd", "CurrentTime");
        private static final javax.xml.namespace.QName TERMINATIONTIME$2 = 
            new javax.xml.namespace.QName("http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd", "TerminationTime");
        
        
        /**
         * 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$0, 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$0, 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$0, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(CURRENTTIME$0);
                }
                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$0, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlDateTime)get_store().add_element_user(CURRENTTIME$0);
                }
                target.set(currentTime);
            }
        }
        
        /**
         * Gets the "TerminationTime" element
         */
        public java.util.Calendar getTerminationTime()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TERMINATIONTIME$2, 0);
                if (target == null)
                {
                    return null;
                }
                return target.getCalendarValue();
            }
        }
        
        /**
         * Gets (as xml) the "TerminationTime" element
         */
        public org.apache.xmlbeans.XmlDateTime xgetTerminationTime()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlDateTime target = null;
                target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(TERMINATIONTIME$2, 0);
                return target;
            }
        }
        
        /**
         * Tests for nil "TerminationTime" element
         */
        public boolean isNilTerminationTime()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlDateTime target = null;
                target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(TERMINATIONTIME$2, 0);
                if (target == null) return false;
                return target.isNil();
            }
        }
        
        /**
         * Sets the "TerminationTime" element
         */
        public void setTerminationTime(java.util.Calendar terminationTime)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TERMINATIONTIME$2, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(TERMINATIONTIME$2);
                }
                target.setCalendarValue(terminationTime);
            }
        }
        
        /**
         * Sets (as xml) the "TerminationTime" element
         */
        public void xsetTerminationTime(org.apache.xmlbeans.XmlDateTime terminationTime)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlDateTime target = null;
                target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(TERMINATIONTIME$2, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlDateTime)get_store().add_element_user(TERMINATIONTIME$2);
                }
                target.set(terminationTime);
            }
        }
        
        /**
         * Nils the "TerminationTime" element
         */
        public void setNilTerminationTime()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlDateTime target = null;
                target = (org.apache.xmlbeans.XmlDateTime)get_store().find_element_user(TERMINATIONTIME$2, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlDateTime)get_store().add_element_user(TERMINATIONTIME$2);
                }
                target.setNil();
            }
        }
    }
}
