/*
 * An XML document type.
 * Localname: TimerEventGenerator
 * Namespace: http://www.bea.com/wli/eventGenerator
 * Java type: com.bea.wli.eventGenerator.TimerEventGeneratorDocument
 *
 * Automatically generated - do not modify.
 */
package com.bea.wli.eventGenerator.impl;
/**
 * A document containing one TimerEventGenerator(@http://www.bea.com/wli/eventGenerator) element.
 *
 * This is a complex type.
 */
public class TimerEventGeneratorDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.bea.wli.eventGenerator.TimerEventGeneratorDocument
{
    
    public TimerEventGeneratorDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName TIMEREVENTGENERATOR$0 = 
        new javax.xml.namespace.QName("http://www.bea.com/wli/eventGenerator", "TimerEventGenerator");
    
    
    /**
     * Gets the "TimerEventGenerator" element
     */
    public com.bea.wli.eventGenerator.TimerEventGeneratorDocument.TimerEventGenerator getTimerEventGenerator()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.wli.eventGenerator.TimerEventGeneratorDocument.TimerEventGenerator target = null;
            target = (com.bea.wli.eventGenerator.TimerEventGeneratorDocument.TimerEventGenerator)get_store().find_element_user(TIMEREVENTGENERATOR$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "TimerEventGenerator" element
     */
    public void setTimerEventGenerator(com.bea.wli.eventGenerator.TimerEventGeneratorDocument.TimerEventGenerator timerEventGenerator)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.wli.eventGenerator.TimerEventGeneratorDocument.TimerEventGenerator target = null;
            target = (com.bea.wli.eventGenerator.TimerEventGeneratorDocument.TimerEventGenerator)get_store().find_element_user(TIMEREVENTGENERATOR$0, 0);
            if (target == null)
            {
                target = (com.bea.wli.eventGenerator.TimerEventGeneratorDocument.TimerEventGenerator)get_store().add_element_user(TIMEREVENTGENERATOR$0);
            }
            target.set(timerEventGenerator);
        }
    }
    
    /**
     * Appends and returns a new empty "TimerEventGenerator" element
     */
    public com.bea.wli.eventGenerator.TimerEventGeneratorDocument.TimerEventGenerator addNewTimerEventGenerator()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.wli.eventGenerator.TimerEventGeneratorDocument.TimerEventGenerator target = null;
            target = (com.bea.wli.eventGenerator.TimerEventGeneratorDocument.TimerEventGenerator)get_store().add_element_user(TIMEREVENTGENERATOR$0);
            return target;
        }
    }
    /**
     * An XML TimerEventGenerator(@http://www.bea.com/wli/eventGenerator).
     *
     * This is a complex type.
     */
    public static class TimerEventGeneratorImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.bea.wli.eventGenerator.TimerEventGeneratorDocument.TimerEventGenerator
    {
        
        public TimerEventGeneratorImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName COMMENT$0 = 
            new javax.xml.namespace.QName("http://www.bea.com/wli/eventGenerator", "comment");
        private static final javax.xml.namespace.QName TIMESTAMP$2 = 
            new javax.xml.namespace.QName("http://www.bea.com/wli/eventGenerator", "timestamp");
        
        
        /**
         * Gets the "comment" element
         */
        public java.lang.String getComment()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(COMMENT$0, 0);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "comment" element
         */
        public org.apache.xmlbeans.XmlString xgetComment()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(COMMENT$0, 0);
                return target;
            }
        }
        
        /**
         * True if has "comment" element
         */
        public boolean isSetComment()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(COMMENT$0) != 0;
            }
        }
        
        /**
         * Sets the "comment" element
         */
        public void setComment(java.lang.String comment)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(COMMENT$0, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(COMMENT$0);
                }
                target.setStringValue(comment);
            }
        }
        
        /**
         * Sets (as xml) the "comment" element
         */
        public void xsetComment(org.apache.xmlbeans.XmlString comment)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(COMMENT$0, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(COMMENT$0);
                }
                target.set(comment);
            }
        }
        
        /**
         * Unsets the "comment" element
         */
        public void unsetComment()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(COMMENT$0, 0);
            }
        }
        
        /**
         * Gets the "timestamp" element
         */
        public java.lang.String getTimestamp()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TIMESTAMP$2, 0);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "timestamp" element
         */
        public org.apache.xmlbeans.XmlString xgetTimestamp()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(TIMESTAMP$2, 0);
                return target;
            }
        }
        
        /**
         * True if has "timestamp" element
         */
        public boolean isSetTimestamp()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(TIMESTAMP$2) != 0;
            }
        }
        
        /**
         * Sets the "timestamp" element
         */
        public void setTimestamp(java.lang.String timestamp)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TIMESTAMP$2, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(TIMESTAMP$2);
                }
                target.setStringValue(timestamp);
            }
        }
        
        /**
         * Sets (as xml) the "timestamp" element
         */
        public void xsetTimestamp(org.apache.xmlbeans.XmlString timestamp)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(TIMESTAMP$2, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(TIMESTAMP$2);
                }
                target.set(timestamp);
            }
        }
        
        /**
         * Unsets the "timestamp" element
         */
        public void unsetTimestamp()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(TIMESTAMP$2, 0);
            }
        }
    }
}
