001    /*
002     * An XML document type.
003     * Localname: service
004     * Namespace: http://geronimo.apache.org/xml/ns/deployment-1.2
005     * Java type: org.apache.geronimo.deployment.xbeans.ServiceDocument
006     *
007     * Automatically generated - do not modify.
008     */
009    package org.apache.geronimo.deployment.xbeans.impl;
010    /**
011     * A document containing one service(@http://geronimo.apache.org/xml/ns/deployment-1.2) element.
012     *
013     * This is a complex type.
014     */
015    public class ServiceDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.geronimo.deployment.xbeans.ServiceDocument
016    {
017        
018        public ServiceDocumentImpl(org.apache.xmlbeans.SchemaType sType)
019        {
020            super(sType);
021        }
022        
023        private static final javax.xml.namespace.QName SERVICE$0 = 
024            new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/deployment-1.2", "service");
025        private static final org.apache.xmlbeans.QNameSet SERVICE$1 = org.apache.xmlbeans.QNameSet.forArray( new javax.xml.namespace.QName[] { 
026            new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/deployment-1.2", "service"),
027            new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/deployment-1.2", "gbean"),
028        });
029        
030        
031        /**
032         * Gets the "service" element
033         */
034        public org.apache.geronimo.deployment.xbeans.AbstractServiceType getService()
035        {
036            synchronized (monitor())
037            {
038                check_orphaned();
039                org.apache.geronimo.deployment.xbeans.AbstractServiceType target = null;
040                target = (org.apache.geronimo.deployment.xbeans.AbstractServiceType)get_store().find_element_user(SERVICE$1, 0);
041                if (target == null)
042                {
043                    return null;
044                }
045                return target;
046            }
047        }
048        
049        /**
050         * Sets the "service" element
051         */
052        public void setService(org.apache.geronimo.deployment.xbeans.AbstractServiceType service)
053        {
054            synchronized (monitor())
055            {
056                check_orphaned();
057                org.apache.geronimo.deployment.xbeans.AbstractServiceType target = null;
058                target = (org.apache.geronimo.deployment.xbeans.AbstractServiceType)get_store().find_element_user(SERVICE$1, 0);
059                if (target == null)
060                {
061                    target = (org.apache.geronimo.deployment.xbeans.AbstractServiceType)get_store().add_element_user(SERVICE$0);
062                }
063                target.set(service);
064            }
065        }
066        
067        /**
068         * Appends and returns a new empty "service" element
069         */
070        public org.apache.geronimo.deployment.xbeans.AbstractServiceType addNewService()
071        {
072            synchronized (monitor())
073            {
074                check_orphaned();
075                org.apache.geronimo.deployment.xbeans.AbstractServiceType target = null;
076                target = (org.apache.geronimo.deployment.xbeans.AbstractServiceType)get_store().add_element_user(SERVICE$0);
077                return target;
078            }
079        }
080    }