/*
 * An XML document type.
 * Localname: service-profile
 * Namespace: http://www.bea.com/2003/03/wli/tpm
 * Java type: com.bea.x2003.x03.wli.tpm.ServiceProfileDocument
 *
 * Automatically generated - do not modify.
 */
package com.bea.x2003.x03.wli.tpm.impl;
/**
 * A document containing one service-profile(@http://www.bea.com/2003/03/wli/tpm) element.
 *
 * This is a complex type.
 */
public class ServiceProfileDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.bea.x2003.x03.wli.tpm.ServiceProfileDocument
{
    
    public ServiceProfileDocumentImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName SERVICEPROFILE$0 = 
        new javax.xml.namespace.QName("http://www.bea.com/2003/03/wli/tpm", "service-profile");
    
    
    /**
     * Gets the "service-profile" element
     */
    public com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile getServiceProfile()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile target = null;
            target = (com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile)get_store().find_element_user(SERVICEPROFILE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "service-profile" element
     */
    public void setServiceProfile(com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile serviceProfile)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile target = null;
            target = (com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile)get_store().find_element_user(SERVICEPROFILE$0, 0);
            if (target == null)
            {
                target = (com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile)get_store().add_element_user(SERVICEPROFILE$0);
            }
            target.set(serviceProfile);
        }
    }
    
    /**
     * Appends and returns a new empty "service-profile" element
     */
    public com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile addNewServiceProfile()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile target = null;
            target = (com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile)get_store().add_element_user(SERVICEPROFILE$0);
            return target;
        }
    }
    /**
     * An XML service-profile(@http://www.bea.com/2003/03/wli/tpm).
     *
     * This is a complex type.
     */
    public static class ServiceProfileImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile
    {
        
        public ServiceProfileImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType);
        }
        
        private static final javax.xml.namespace.QName LOCALTRADINGPARTNER$0 = 
            new javax.xml.namespace.QName("", "local-trading-partner");
        private static final javax.xml.namespace.QName LOCALBINDING$2 = 
            new javax.xml.namespace.QName("", "local-binding");
        private static final javax.xml.namespace.QName EXTERNALTRADINGPARTNER$4 = 
            new javax.xml.namespace.QName("", "external-trading-partner");
        private static final javax.xml.namespace.QName EXTERNALBINDING$6 = 
            new javax.xml.namespace.QName("", "external-binding");
        private static final javax.xml.namespace.QName STATUS$8 = 
            new javax.xml.namespace.QName("", "status");
        private static final javax.xml.namespace.QName MESSAGETRACKING$10 = 
            new javax.xml.namespace.QName("", "message-tracking");
        private static final javax.xml.namespace.QName SERVICEPROFILEID$12 = 
            new javax.xml.namespace.QName("", "service-profile-id");
        
        
        /**
         * Gets the "local-trading-partner" attribute
         */
        public java.lang.String getLocalTradingPartner()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(LOCALTRADINGPARTNER$0);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "local-trading-partner" attribute
         */
        public com.bea.x2003.x03.wli.tpm.Reference xgetLocalTradingPartner()
        {
            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(LOCALTRADINGPARTNER$0);
                return target;
            }
        }
        
        /**
         * True if has "local-trading-partner" attribute
         */
        public boolean isSetLocalTradingPartner()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(LOCALTRADINGPARTNER$0) != null;
            }
        }
        
        /**
         * Sets the "local-trading-partner" attribute
         */
        public void setLocalTradingPartner(java.lang.String localTradingPartner)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(LOCALTRADINGPARTNER$0);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(LOCALTRADINGPARTNER$0);
                }
                target.setStringValue(localTradingPartner);
            }
        }
        
        /**
         * Sets (as xml) the "local-trading-partner" attribute
         */
        public void xsetLocalTradingPartner(com.bea.x2003.x03.wli.tpm.Reference localTradingPartner)
        {
            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(LOCALTRADINGPARTNER$0);
                if (target == null)
                {
                    target = (com.bea.x2003.x03.wli.tpm.Reference)get_store().add_attribute_user(LOCALTRADINGPARTNER$0);
                }
                target.set(localTradingPartner);
            }
        }
        
        /**
         * Unsets the "local-trading-partner" attribute
         */
        public void unsetLocalTradingPartner()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(LOCALTRADINGPARTNER$0);
            }
        }
        
        /**
         * Gets the "local-binding" attribute
         */
        public java.lang.String getLocalBinding()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(LOCALBINDING$2);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "local-binding" attribute
         */
        public com.bea.x2003.x03.wli.tpm.Reference xgetLocalBinding()
        {
            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(LOCALBINDING$2);
                return target;
            }
        }
        
        /**
         * True if has "local-binding" attribute
         */
        public boolean isSetLocalBinding()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(LOCALBINDING$2) != null;
            }
        }
        
        /**
         * Sets the "local-binding" attribute
         */
        public void setLocalBinding(java.lang.String localBinding)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(LOCALBINDING$2);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(LOCALBINDING$2);
                }
                target.setStringValue(localBinding);
            }
        }
        
        /**
         * Sets (as xml) the "local-binding" attribute
         */
        public void xsetLocalBinding(com.bea.x2003.x03.wli.tpm.Reference localBinding)
        {
            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(LOCALBINDING$2);
                if (target == null)
                {
                    target = (com.bea.x2003.x03.wli.tpm.Reference)get_store().add_attribute_user(LOCALBINDING$2);
                }
                target.set(localBinding);
            }
        }
        
        /**
         * Unsets the "local-binding" attribute
         */
        public void unsetLocalBinding()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(LOCALBINDING$2);
            }
        }
        
        /**
         * Gets the "external-trading-partner" attribute
         */
        public java.lang.String getExternalTradingPartner()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(EXTERNALTRADINGPARTNER$4);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "external-trading-partner" attribute
         */
        public com.bea.x2003.x03.wli.tpm.Reference xgetExternalTradingPartner()
        {
            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(EXTERNALTRADINGPARTNER$4);
                return target;
            }
        }
        
        /**
         * Sets the "external-trading-partner" attribute
         */
        public void setExternalTradingPartner(java.lang.String externalTradingPartner)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(EXTERNALTRADINGPARTNER$4);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(EXTERNALTRADINGPARTNER$4);
                }
                target.setStringValue(externalTradingPartner);
            }
        }
        
        /**
         * Sets (as xml) the "external-trading-partner" attribute
         */
        public void xsetExternalTradingPartner(com.bea.x2003.x03.wli.tpm.Reference externalTradingPartner)
        {
            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(EXTERNALTRADINGPARTNER$4);
                if (target == null)
                {
                    target = (com.bea.x2003.x03.wli.tpm.Reference)get_store().add_attribute_user(EXTERNALTRADINGPARTNER$4);
                }
                target.set(externalTradingPartner);
            }
        }
        
        /**
         * Gets the "external-binding" attribute
         */
        public java.lang.String getExternalBinding()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(EXTERNALBINDING$6);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "external-binding" attribute
         */
        public com.bea.x2003.x03.wli.tpm.Reference xgetExternalBinding()
        {
            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(EXTERNALBINDING$6);
                return target;
            }
        }
        
        /**
         * True if has "external-binding" attribute
         */
        public boolean isSetExternalBinding()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(EXTERNALBINDING$6) != null;
            }
        }
        
        /**
         * Sets the "external-binding" attribute
         */
        public void setExternalBinding(java.lang.String externalBinding)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(EXTERNALBINDING$6);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(EXTERNALBINDING$6);
                }
                target.setStringValue(externalBinding);
            }
        }
        
        /**
         * Sets (as xml) the "external-binding" attribute
         */
        public void xsetExternalBinding(com.bea.x2003.x03.wli.tpm.Reference externalBinding)
        {
            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(EXTERNALBINDING$6);
                if (target == null)
                {
                    target = (com.bea.x2003.x03.wli.tpm.Reference)get_store().add_attribute_user(EXTERNALBINDING$6);
                }
                target.set(externalBinding);
            }
        }
        
        /**
         * Unsets the "external-binding" attribute
         */
        public void unsetExternalBinding()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(EXTERNALBINDING$6);
            }
        }
        
        /**
         * Gets the "status" attribute
         */
        public com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile.Status.Enum getStatus()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STATUS$8);
                if (target == null)
                {
                    return null;
                }
                return (com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile.Status.Enum)target.getEnumValue();
            }
        }
        
        /**
         * Gets (as xml) the "status" attribute
         */
        public com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile.Status xgetStatus()
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile.Status target = null;
                target = (com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile.Status)get_store().find_attribute_user(STATUS$8);
                return target;
            }
        }
        
        /**
         * True if has "status" attribute
         */
        public boolean isSetStatus()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(STATUS$8) != null;
            }
        }
        
        /**
         * Sets the "status" attribute
         */
        public void setStatus(com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile.Status.Enum status)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STATUS$8);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(STATUS$8);
                }
                target.setEnumValue(status);
            }
        }
        
        /**
         * Sets (as xml) the "status" attribute
         */
        public void xsetStatus(com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile.Status status)
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile.Status target = null;
                target = (com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile.Status)get_store().find_attribute_user(STATUS$8);
                if (target == null)
                {
                    target = (com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile.Status)get_store().add_attribute_user(STATUS$8);
                }
                target.set(status);
            }
        }
        
        /**
         * Unsets the "status" attribute
         */
        public void unsetStatus()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(STATUS$8);
            }
        }
        
        /**
         * Gets the "message-tracking" attribute
         */
        public com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile.MessageTracking.Enum getMessageTracking()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(MESSAGETRACKING$10);
                if (target == null)
                {
                    return null;
                }
                return (com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile.MessageTracking.Enum)target.getEnumValue();
            }
        }
        
        /**
         * Gets (as xml) the "message-tracking" attribute
         */
        public com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile.MessageTracking xgetMessageTracking()
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile.MessageTracking target = null;
                target = (com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile.MessageTracking)get_store().find_attribute_user(MESSAGETRACKING$10);
                return target;
            }
        }
        
        /**
         * True if has "message-tracking" attribute
         */
        public boolean isSetMessageTracking()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(MESSAGETRACKING$10) != null;
            }
        }
        
        /**
         * Sets the "message-tracking" attribute
         */
        public void setMessageTracking(com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile.MessageTracking.Enum messageTracking)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(MESSAGETRACKING$10);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(MESSAGETRACKING$10);
                }
                target.setEnumValue(messageTracking);
            }
        }
        
        /**
         * Sets (as xml) the "message-tracking" attribute
         */
        public void xsetMessageTracking(com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile.MessageTracking messageTracking)
        {
            synchronized (monitor())
            {
                check_orphaned();
                com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile.MessageTracking target = null;
                target = (com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile.MessageTracking)get_store().find_attribute_user(MESSAGETRACKING$10);
                if (target == null)
                {
                    target = (com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile.MessageTracking)get_store().add_attribute_user(MESSAGETRACKING$10);
                }
                target.set(messageTracking);
            }
        }
        
        /**
         * Unsets the "message-tracking" attribute
         */
        public void unsetMessageTracking()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(MESSAGETRACKING$10);
            }
        }
        
        /**
         * Gets the "service-profile-id" attribute
         */
        public java.lang.String getServiceProfileId()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(SERVICEPROFILEID$12);
                if (target == null)
                {
                    return null;
                }
                return target.getStringValue();
            }
        }
        
        /**
         * Gets (as xml) the "service-profile-id" attribute
         */
        public org.apache.xmlbeans.XmlString xgetServiceProfileId()
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(SERVICEPROFILEID$12);
                return target;
            }
        }
        
        /**
         * True if has "service-profile-id" attribute
         */
        public boolean isSetServiceProfileId()
        {
            synchronized (monitor())
            {
                check_orphaned();
                return get_store().find_attribute_user(SERVICEPROFILEID$12) != null;
            }
        }
        
        /**
         * Sets the "service-profile-id" attribute
         */
        public void setServiceProfileId(java.lang.String serviceProfileId)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.SimpleValue target = null;
                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(SERVICEPROFILEID$12);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(SERVICEPROFILEID$12);
                }
                target.setStringValue(serviceProfileId);
            }
        }
        
        /**
         * Sets (as xml) the "service-profile-id" attribute
         */
        public void xsetServiceProfileId(org.apache.xmlbeans.XmlString serviceProfileId)
        {
            synchronized (monitor())
            {
                check_orphaned();
                org.apache.xmlbeans.XmlString target = null;
                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(SERVICEPROFILEID$12);
                if (target == null)
                {
                    target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(SERVICEPROFILEID$12);
                }
                target.set(serviceProfileId);
            }
        }
        
        /**
         * Unsets the "service-profile-id" attribute
         */
        public void unsetServiceProfileId()
        {
            synchronized (monitor())
            {
                check_orphaned();
                get_store().remove_attribute(SERVICEPROFILEID$12);
            }
        }
        /**
         * An XML status(@).
         *
         * This is an atomic type that is a restriction of com.bea.x2003.x03.wli.tpm.ServiceProfileDocument$ServiceProfile$Status.
         */
        public static class StatusImpl extends org.apache.xmlbeans.impl.values.JavaStringEnumerationHolderEx implements com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile.Status
        {
            
            public StatusImpl(org.apache.xmlbeans.SchemaType sType)
            {
                super(sType, false);
            }
            
            protected StatusImpl(org.apache.xmlbeans.SchemaType sType, boolean b)
            {
                super(sType, b);
            }
        }
        /**
         * An XML message-tracking(@).
         *
         * This is an atomic type that is a restriction of com.bea.x2003.x03.wli.tpm.ServiceProfileDocument$ServiceProfile$MessageTracking.
         */
        public static class MessageTrackingImpl extends org.apache.xmlbeans.impl.values.JavaStringEnumerationHolderEx implements com.bea.x2003.x03.wli.tpm.ServiceProfileDocument.ServiceProfile.MessageTracking
        {
            
            public MessageTrackingImpl(org.apache.xmlbeans.SchemaType sType)
            {
                super(sType, false);
            }
            
            protected MessageTrackingImpl(org.apache.xmlbeans.SchemaType sType, boolean b)
            {
                super(sType, b);
            }
        }
    }
}
