/*
 * XML Type:  messageType
 * Namespace: http://www.bea.com/wli/worklist/xml
 * Java type: com.bea.wli.worklist.xml.MessageType
 *
 * Automatically generated - do not modify.
 */
package com.bea.wli.worklist.xml.impl;
/**
 * An XML messageType(@http://www.bea.com/wli/worklist/xml).
 *
 * This is a complex type.
 */
public class MessageTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.bea.wli.worklist.xml.MessageType
{
    
    public MessageTypeImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName MESSAGE$0 = 
        new javax.xml.namespace.QName("http://www.bea.com/wli/worklist/xml", "message");
    private static final javax.xml.namespace.QName MIMETYPE$2 = 
        new javax.xml.namespace.QName("http://www.bea.com/wli/worklist/xml", "mime-type");
    
    
    /**
     * Gets the "message" element
     */
    public com.bea.wli.worklist.xml.Data getMessage()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.wli.worklist.xml.Data target = null;
            target = (com.bea.wli.worklist.xml.Data)get_store().find_element_user(MESSAGE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "message" element
     */
    public void setMessage(com.bea.wli.worklist.xml.Data message)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.wli.worklist.xml.Data target = null;
            target = (com.bea.wli.worklist.xml.Data)get_store().find_element_user(MESSAGE$0, 0);
            if (target == null)
            {
                target = (com.bea.wli.worklist.xml.Data)get_store().add_element_user(MESSAGE$0);
            }
            target.set(message);
        }
    }
    
    /**
     * Appends and returns a new empty "message" element
     */
    public com.bea.wli.worklist.xml.Data addNewMessage()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.wli.worklist.xml.Data target = null;
            target = (com.bea.wli.worklist.xml.Data)get_store().add_element_user(MESSAGE$0);
            return target;
        }
    }
    
    /**
     * Gets the "mime-type" element
     */
    public java.lang.String getMimeType()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MIMETYPE$2, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "mime-type" element
     */
    public org.apache.xmlbeans.XmlString xgetMimeType()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(MIMETYPE$2, 0);
            return target;
        }
    }
    
    /**
     * True if has "mime-type" element
     */
    public boolean isSetMimeType()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(MIMETYPE$2) != 0;
        }
    }
    
    /**
     * Sets the "mime-type" element
     */
    public void setMimeType(java.lang.String mimeType)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(MIMETYPE$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(MIMETYPE$2);
            }
            target.setStringValue(mimeType);
        }
    }
    
    /**
     * Sets (as xml) the "mime-type" element
     */
    public void xsetMimeType(org.apache.xmlbeans.XmlString mimeType)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(MIMETYPE$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(MIMETYPE$2);
            }
            target.set(mimeType);
        }
    }
    
    /**
     * Unsets the "mime-type" element
     */
    public void unsetMimeType()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(MIMETYPE$2, 0);
        }
    }
}
