001    /*
002     * XML Type:  transportAddressType
003     * Namespace: http://openejb.apache.org/xml/ns/corba-tss-config-2.1
004     * Java type: org.apache.geronimo.corba.xbeans.csiv2.tss.TSSTransportAddressType
005     *
006     * Automatically generated - do not modify.
007     */
008    package org.apache.geronimo.corba.xbeans.csiv2.tss.impl;
009    /**
010     * An XML transportAddressType(@http://openejb.apache.org/xml/ns/corba-tss-config-2.1).
011     *
012     * This is an atomic type that is a restriction of org.apache.geronimo.corba.xbeans.csiv2.tss.TSSTransportAddressType.
013     */
014    public class TSSTransportAddressTypeImpl extends org.apache.xmlbeans.impl.values.JavaStringHolderEx implements org.apache.geronimo.corba.xbeans.csiv2.tss.TSSTransportAddressType
015    {
016        
017        public TSSTransportAddressTypeImpl(org.apache.xmlbeans.SchemaType sType)
018        {
019            super(sType, true);
020        }
021        
022        protected TSSTransportAddressTypeImpl(org.apache.xmlbeans.SchemaType sType, boolean b)
023        {
024            super(sType, b);
025        }
026        
027        private static final javax.xml.namespace.QName PORT$0 = 
028            new javax.xml.namespace.QName("", "port");
029        private static final javax.xml.namespace.QName HOSTNAME$2 = 
030            new javax.xml.namespace.QName("", "hostname");
031        
032        
033        /**
034         * Gets the "port" attribute
035         */
036        public short getPort()
037        {
038            synchronized (monitor())
039            {
040                check_orphaned();
041                org.apache.xmlbeans.SimpleValue target = null;
042                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PORT$0);
043                if (target == null)
044                {
045                    return 0;
046                }
047                return target.getShortValue();
048            }
049        }
050        
051        /**
052         * Gets (as xml) the "port" attribute
053         */
054        public org.apache.xmlbeans.XmlShort xgetPort()
055        {
056            synchronized (monitor())
057            {
058                check_orphaned();
059                org.apache.xmlbeans.XmlShort target = null;
060                target = (org.apache.xmlbeans.XmlShort)get_store().find_attribute_user(PORT$0);
061                return target;
062            }
063        }
064        
065        /**
066         * True if has "port" attribute
067         */
068        public boolean isSetPort()
069        {
070            synchronized (monitor())
071            {
072                check_orphaned();
073                return get_store().find_attribute_user(PORT$0) != null;
074            }
075        }
076        
077        /**
078         * Sets the "port" attribute
079         */
080        public void setPort(short port)
081        {
082            synchronized (monitor())
083            {
084                check_orphaned();
085                org.apache.xmlbeans.SimpleValue target = null;
086                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(PORT$0);
087                if (target == null)
088                {
089                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(PORT$0);
090                }
091                target.setShortValue(port);
092            }
093        }
094        
095        /**
096         * Sets (as xml) the "port" attribute
097         */
098        public void xsetPort(org.apache.xmlbeans.XmlShort port)
099        {
100            synchronized (monitor())
101            {
102                check_orphaned();
103                org.apache.xmlbeans.XmlShort target = null;
104                target = (org.apache.xmlbeans.XmlShort)get_store().find_attribute_user(PORT$0);
105                if (target == null)
106                {
107                    target = (org.apache.xmlbeans.XmlShort)get_store().add_attribute_user(PORT$0);
108                }
109                target.set(port);
110            }
111        }
112        
113        /**
114         * Unsets the "port" attribute
115         */
116        public void unsetPort()
117        {
118            synchronized (monitor())
119            {
120                check_orphaned();
121                get_store().remove_attribute(PORT$0);
122            }
123        }
124        
125        /**
126         * Gets the "hostname" attribute
127         */
128        public java.lang.String getHostname()
129        {
130            synchronized (monitor())
131            {
132                check_orphaned();
133                org.apache.xmlbeans.SimpleValue target = null;
134                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(HOSTNAME$2);
135                if (target == null)
136                {
137                    return null;
138                }
139                return target.getStringValue();
140            }
141        }
142        
143        /**
144         * Gets (as xml) the "hostname" attribute
145         */
146        public org.apache.xmlbeans.XmlString xgetHostname()
147        {
148            synchronized (monitor())
149            {
150                check_orphaned();
151                org.apache.xmlbeans.XmlString target = null;
152                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(HOSTNAME$2);
153                return target;
154            }
155        }
156        
157        /**
158         * True if has "hostname" attribute
159         */
160        public boolean isSetHostname()
161        {
162            synchronized (monitor())
163            {
164                check_orphaned();
165                return get_store().find_attribute_user(HOSTNAME$2) != null;
166            }
167        }
168        
169        /**
170         * Sets the "hostname" attribute
171         */
172        public void setHostname(java.lang.String hostname)
173        {
174            synchronized (monitor())
175            {
176                check_orphaned();
177                org.apache.xmlbeans.SimpleValue target = null;
178                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(HOSTNAME$2);
179                if (target == null)
180                {
181                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(HOSTNAME$2);
182                }
183                target.setStringValue(hostname);
184            }
185        }
186        
187        /**
188         * Sets (as xml) the "hostname" attribute
189         */
190        public void xsetHostname(org.apache.xmlbeans.XmlString hostname)
191        {
192            synchronized (monitor())
193            {
194                check_orphaned();
195                org.apache.xmlbeans.XmlString target = null;
196                target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(HOSTNAME$2);
197                if (target == null)
198                {
199                    target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(HOSTNAME$2);
200                }
201                target.set(hostname);
202            }
203        }
204        
205        /**
206         * Unsets the "hostname" attribute
207         */
208        public void unsetHostname()
209        {
210            synchronized (monitor())
211            {
212                check_orphaned();
213                get_store().remove_attribute(HOSTNAME$2);
214            }
215        }
216    }