/*
 * XML Type:  ServiceNameType
 * Namespace: http://schemas.xmlsoap.org/ws/2004/08/addressing
 * Java type: org.activemq.ws.xmlbeans.addressing.v2004_08.ServiceNameType
 *
 * Automatically generated - do not modify.
 */
package org.activemq.ws.xmlbeans.addressing.v2004_08.impl;
/**
 * An XML ServiceNameType(@http://schemas.xmlsoap.org/ws/2004/08/addressing).
 *
 * This is an atomic type that is a restriction of org.apache.xmlbeans.XmlQName.
 */
public class ServiceNameTypeImpl extends org.apache.xmlbeans.impl.values.JavaQNameHolderEx implements org.activemq.ws.xmlbeans.addressing.v2004_08.ServiceNameType
{
    
    public ServiceNameTypeImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType, true);
    }
    
    protected ServiceNameTypeImpl(org.apache.xmlbeans.SchemaType sType, boolean b)
    {
        super(sType, b);
    }
    
    private static final javax.xml.namespace.QName PORTNAME$0 = 
        new javax.xml.namespace.QName("", "PortName");
    
    
    /**
     * Gets the "PortName" attribute
     */
    public java.lang.String getPortName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PORTNAME$0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "PortName" attribute
     */
    public org.apache.xmlbeans.XmlNCName xgetPortName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlNCName target = null;
            target = (org.apache.xmlbeans.XmlNCName)get_store().find_attribute_user(PORTNAME$0);
            return target;
        }
    }
    
    /**
     * True if has "PortName" attribute
     */
    public boolean isSetPortName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(PORTNAME$0) != null;
        }
    }
    
    /**
     * Sets the "PortName" attribute
     */
    public void setPortName(java.lang.String portName)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PORTNAME$0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(PORTNAME$0);
            }
            target.setStringValue(portName);
        }
    }
    
    /**
     * Sets (as xml) the "PortName" attribute
     */
    public void xsetPortName(org.apache.xmlbeans.XmlNCName portName)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlNCName target = null;
            target = (org.apache.xmlbeans.XmlNCName)get_store().find_attribute_user(PORTNAME$0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlNCName)get_store().add_attribute_user(PORTNAME$0);
            }
            target.set(portName);
        }
    }
    
    /**
     * Unsets the "PortName" attribute
     */
    public void unsetPortName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(PORTNAME$0);
        }
    }
}
