/*
 * An XML document type.
 * Localname: EmailEventGenerator
 * Namespace: http://www.bea.com/wli/eventGenerator
 * Java type: com.bea.wli.eventGenerator.EmailEventGeneratorDocument
 *
 * Automatically generated - do not modify.
 */
package com.bea.wli.eventGenerator.impl;
/**
 * A document containing one EmailEventGenerator(@http://www.bea.com/wli/eventGenerator) element.
 *
 * This is a complex type.
 */
public class EmailEventGeneratorDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.bea.wli.eventGenerator.EmailEventGeneratorDocument
{
    
    public EmailEventGeneratorDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName EMAILEVENTGENERATOR$0 = 
        new javax.xml.namespace.QName("http://www.bea.com/wli/eventGenerator", "EmailEventGenerator");
    
    
    /**
     * Gets the "EmailEventGenerator" element
     */
    public com.bea.wli.eventGenerator.EmailEventGeneratorDocument.EmailEventGenerator getEmailEventGenerator()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.wli.eventGenerator.EmailEventGeneratorDocument.EmailEventGenerator target = null;
            target = (com.bea.wli.eventGenerator.EmailEventGeneratorDocument.EmailEventGenerator)get_store().find_element_user(EMAILEVENTGENERATOR$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "EmailEventGenerator" element
     */
    public void setEmailEventGenerator(com.bea.wli.eventGenerator.EmailEventGeneratorDocument.EmailEventGenerator emailEventGenerator)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.wli.eventGenerator.EmailEventGeneratorDocument.EmailEventGenerator target = null;
            target = (com.bea.wli.eventGenerator.EmailEventGeneratorDocument.EmailEventGenerator)get_store().find_element_user(EMAILEVENTGENERATOR$0, 0);
            if (target == null)
            {
                target = (com.bea.wli.eventGenerator.EmailEventGeneratorDocument.EmailEventGenerator)get_store().add_element_user(EMAILEVENTGENERATOR$0);
            }
            target.set(emailEventGenerator);
        }
    }
    
    /**
     * Appends and returns a new empty "EmailEventGenerator" element
     */
    public com.bea.wli.eventGenerator.EmailEventGeneratorDocument.EmailEventGenerator addNewEmailEventGenerator()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.wli.eventGenerator.EmailEventGeneratorDocument.EmailEventGenerator target = null;
            target = (com.bea.wli.eventGenerator.EmailEventGeneratorDocument.EmailEventGenerator)get_store().add_element_user(EMAILEVENTGENERATOR$0);
            return target;
        }
    }
    /**
     * An XML EmailEventGenerator(@http://www.bea.com/wli/eventGenerator).
     *
     * This is a complex type.
     */
    public static class EmailEventGeneratorImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.bea.wli.eventGenerator.EmailEventGeneratorDocument.EmailEventGenerator
    {
        
        public EmailEventGeneratorImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName FROM$0 = 
            new javax.xml.namespace.QName("http://www.bea.com/wli/eventGenerator", "From");
        private static final javax.xml.namespace.QName SUBJECT$2 = 
            new javax.xml.namespace.QName("http://www.bea.com/wli/eventGenerator", "Subject");
        private static final javax.xml.namespace.QName ATTACHMENTS$4 = 
            new javax.xml.namespace.QName("http://www.bea.com/wli/eventGenerator", "Attachments");
        private static final javax.xml.namespace.QName SENT$6 = 
            new javax.xml.namespace.QName("http://www.bea.com/wli/eventGenerator", "Sent");
        private static final javax.xml.namespace.QName RECEIVED$8 = 
            new javax.xml.namespace.QName("http://www.bea.com/wli/eventGenerator", "Received");
        
        
        /**
         * Gets the "From" element
         */
        public java.lang.String getFrom()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROM$0, 0);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "From" element
         */
        public org.apache.xmlbeans.XmlString xgetFrom()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FROM$0, 0);
                return target;
            }
        }
        
        /**
         * True if has "From" element
         */
        public boolean isSetFrom()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(FROM$0) != 0;
            }
        }
        
        /**
         * Sets the "From" element
         */
        public void setFrom(java.lang.String from)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FROM$0, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(FROM$0);
                }
                target.setStringValue(from);
            }
        }
        
        /**
         * Sets (as xml) the "From" element
         */
        public void xsetFrom(org.apache.xmlbeans.XmlString from)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FROM$0, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(FROM$0);
                }
                target.set(from);
            }
        }
        
        /**
         * Unsets the "From" element
         */
        public void unsetFrom()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(FROM$0, 0);
            }
        }
        
        /**
         * Gets the "Subject" element
         */
        public java.lang.String getSubject()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SUBJECT$2, 0);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "Subject" element
         */
        public org.apache.xmlbeans.XmlString xgetSubject()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(SUBJECT$2, 0);
                return target;
            }
        }
        
        /**
         * True if has "Subject" element
         */
        public boolean isSetSubject()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(SUBJECT$2) != 0;
            }
        }
        
        /**
         * Sets the "Subject" element
         */
        public void setSubject(java.lang.String subject)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SUBJECT$2, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SUBJECT$2);
                }
                target.setStringValue(subject);
            }
        }
        
        /**
         * Sets (as xml) the "Subject" element
         */
        public void xsetSubject(org.apache.xmlbeans.XmlString subject)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(SUBJECT$2, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(SUBJECT$2);
                }
                target.set(subject);
            }
        }
        
        /**
         * Unsets the "Subject" element
         */
        public void unsetSubject()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(SUBJECT$2, 0);
            }
        }
        
        /**
         * Gets the "Attachments" element
         */
        public java.lang.String getAttachments()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ATTACHMENTS$4, 0);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "Attachments" element
         */
        public org.apache.xmlbeans.XmlString xgetAttachments()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(ATTACHMENTS$4, 0);
                return target;
            }
        }
        
        /**
         * True if has "Attachments" element
         */
        public boolean isSetAttachments()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(ATTACHMENTS$4) != 0;
            }
        }
        
        /**
         * Sets the "Attachments" element
         */
        public void setAttachments(java.lang.String attachments)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(ATTACHMENTS$4, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ATTACHMENTS$4);
                }
                target.setStringValue(attachments);
            }
        }
        
        /**
         * Sets (as xml) the "Attachments" element
         */
        public void xsetAttachments(org.apache.xmlbeans.XmlString attachments)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(ATTACHMENTS$4, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(ATTACHMENTS$4);
                }
                target.set(attachments);
            }
        }
        
        /**
         * Unsets the "Attachments" element
         */
        public void unsetAttachments()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(ATTACHMENTS$4, 0);
            }
        }
        
        /**
         * Gets the "Sent" element
         */
        public java.lang.String getSent()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SENT$6, 0);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "Sent" element
         */
        public org.apache.xmlbeans.XmlString xgetSent()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(SENT$6, 0);
                return target;
            }
        }
        
        /**
         * True if has "Sent" element
         */
        public boolean isSetSent()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(SENT$6) != 0;
            }
        }
        
        /**
         * Sets the "Sent" element
         */
        public void setSent(java.lang.String sent)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SENT$6, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SENT$6);
                }
                target.setStringValue(sent);
            }
        }
        
        /**
         * Sets (as xml) the "Sent" element
         */
        public void xsetSent(org.apache.xmlbeans.XmlString sent)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(SENT$6, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(SENT$6);
                }
                target.set(sent);
            }
        }
        
        /**
         * Unsets the "Sent" element
         */
        public void unsetSent()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(SENT$6, 0);
            }
        }
        
        /**
         * Gets the "Received" element
         */
        public java.lang.String getReceived()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(RECEIVED$8, 0);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "Received" element
         */
        public org.apache.xmlbeans.XmlString xgetReceived()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(RECEIVED$8, 0);
                return target;
            }
        }
        
        /**
         * True if has "Received" element
         */
        public boolean isSetReceived()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().count_elements(RECEIVED$8) != 0;
            }
        }
        
        /**
         * Sets the "Received" element
         */
        public void setReceived(java.lang.String received)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(RECEIVED$8, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(RECEIVED$8);
                }
                target.setStringValue(received);
            }
        }
        
        /**
         * Sets (as xml) the "Received" element
         */
        public void xsetReceived(org.apache.xmlbeans.XmlString received)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(RECEIVED$8, 0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(RECEIVED$8);
                }
                target.set(received);
            }
        }
        
        /**
         * Unsets the "Received" element
         */
        public void unsetReceived()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_element(RECEIVED$8, 0);
            }
        }
    }
}
