/*
 * An XML document type.
 * Localname: failure-notifier
 * Namespace: http://www.bea.com/2003/03/wli/tpm
 * Java type: com.bea.x2003.x03.wli.tpm.FailureNotifierDocument
 *
 * Automatically generated - do not modify.
 */
package com.bea.x2003.x03.wli.tpm.impl;
/**
 * A document containing one failure-notifier(@http://www.bea.com/2003/03/wli/tpm) element.
 *
 * This is a complex type.
 */
public class FailureNotifierDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.bea.x2003.x03.wli.tpm.FailureNotifierDocument
{
    
    public FailureNotifierDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName FAILURENOTIFIER$0 = 
        new javax.xml.namespace.QName("http://www.bea.com/2003/03/wli/tpm", "failure-notifier");
    
    
    /**
     * Gets the "failure-notifier" element
     */
    public com.bea.x2003.x03.wli.tpm.FailureNotifierDocument.FailureNotifier getFailureNotifier()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.x2003.x03.wli.tpm.FailureNotifierDocument.FailureNotifier target = null;
            target = (com.bea.x2003.x03.wli.tpm.FailureNotifierDocument.FailureNotifier)get_store().find_element_user(FAILURENOTIFIER$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "failure-notifier" element
     */
    public void setFailureNotifier(com.bea.x2003.x03.wli.tpm.FailureNotifierDocument.FailureNotifier failureNotifier)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.x2003.x03.wli.tpm.FailureNotifierDocument.FailureNotifier target = null;
            target = (com.bea.x2003.x03.wli.tpm.FailureNotifierDocument.FailureNotifier)get_store().find_element_user(FAILURENOTIFIER$0, 0);
            if (target == null)
            {
                target = (com.bea.x2003.x03.wli.tpm.FailureNotifierDocument.FailureNotifier)get_store().add_element_user(FAILURENOTIFIER$0);
            }
            target.set(failureNotifier);
        }
    }
    
    /**
     * Appends and returns a new empty "failure-notifier" element
     */
    public com.bea.x2003.x03.wli.tpm.FailureNotifierDocument.FailureNotifier addNewFailureNotifier()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.x2003.x03.wli.tpm.FailureNotifierDocument.FailureNotifier target = null;
            target = (com.bea.x2003.x03.wli.tpm.FailureNotifierDocument.FailureNotifier)get_store().add_element_user(FAILURENOTIFIER$0);
            return target;
        }
    }
    /**
     * An XML failure-notifier(@http://www.bea.com/2003/03/wli/tpm).
     *
     * This is a complex type.
     */
    public static class FailureNotifierImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.bea.x2003.x03.wli.tpm.FailureNotifierDocument.FailureNotifier
    {
        
        public FailureNotifierImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName TRADINGPARTNERNAME$0 = 
            new javax.xml.namespace.QName("", "trading-partner-name");
        private static final javax.xml.namespace.QName BINDINGNAME$2 = 
            new javax.xml.namespace.QName("", "binding-name");
        
        
        /**
         * Gets the "trading-partner-name" attribute
         */
        public java.lang.String getTradingPartnerName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TRADINGPARTNERNAME$0);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "trading-partner-name" attribute
         */
        public com.bea.x2003.x03.wli.tpm.Reference xgetTradingPartnerName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.bea.x2003.x03.wli.tpm.Reference target = null;
                target = (com.bea.x2003.x03.wli.tpm.Reference)get_store().find_attribute_user(TRADINGPARTNERNAME$0);
                return target;
            }
        }
        
        /**
         * Sets the "trading-partner-name" attribute
         */
        public void setTradingPartnerName(java.lang.String tradingPartnerName)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TRADINGPARTNERNAME$0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(TRADINGPARTNERNAME$0);
                }
                target.setStringValue(tradingPartnerName);
            }
        }
        
        /**
         * Sets (as xml) the "trading-partner-name" attribute
         */
        public void xsetTradingPartnerName(com.bea.x2003.x03.wli.tpm.Reference tradingPartnerName)
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.bea.x2003.x03.wli.tpm.Reference target = null;
                target = (com.bea.x2003.x03.wli.tpm.Reference)get_store().find_attribute_user(TRADINGPARTNERNAME$0);
                if (target == null)
                {
                    target = (com.bea.x2003.x03.wli.tpm.Reference)get_store().add_attribute_user(TRADINGPARTNERNAME$0);
                }
                target.set(tradingPartnerName);
            }
        }
        
        /**
         * Gets the "binding-name" attribute
         */
        public java.lang.String getBindingName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(BINDINGNAME$2);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "binding-name" attribute
         */
        public com.bea.x2003.x03.wli.tpm.Reference xgetBindingName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.bea.x2003.x03.wli.tpm.Reference target = null;
                target = (com.bea.x2003.x03.wli.tpm.Reference)get_store().find_attribute_user(BINDINGNAME$2);
                return target;
            }
        }
        
        /**
         * True if has "binding-name" attribute
         */
        public boolean isSetBindingName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(BINDINGNAME$2) != null;
            }
        }
        
        /**
         * Sets the "binding-name" attribute
         */
        public void setBindingName(java.lang.String bindingName)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(BINDINGNAME$2);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(BINDINGNAME$2);
                }
                target.setStringValue(bindingName);
            }
        }
        
        /**
         * Sets (as xml) the "binding-name" attribute
         */
        public void xsetBindingName(com.bea.x2003.x03.wli.tpm.Reference bindingName)
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.bea.x2003.x03.wli.tpm.Reference target = null;
                target = (com.bea.x2003.x03.wli.tpm.Reference)get_store().find_attribute_user(BINDINGNAME$2);
                if (target == null)
                {
                    target = (com.bea.x2003.x03.wli.tpm.Reference)get_store().add_attribute_user(BINDINGNAME$2);
                }
                target.set(bindingName);
            }
        }
        
        /**
         * Unsets the "binding-name" attribute
         */
        public void unsetBindingName()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(BINDINGNAME$2);
            }
        }
    }
}
