001    /*
002     * XML Type:  jbi-type
003     * Namespace: http://servicemix.apache.org/xml/ns/jbi-1.0
004     * Java type: org.apache.servicemix.geronimo.deployment.SMJbiType
005     *
006     * Automatically generated - do not modify.
007     */
008    package org.apache.servicemix.geronimo.deployment.impl;
009    /**
010     * An XML jbi-type(@http://servicemix.apache.org/xml/ns/jbi-1.0).
011     *
012     * This is a complex type.
013     */
014    public class SMJbiTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.servicemix.geronimo.deployment.SMJbiType
015    {
016        private static final long serialVersionUID = 1L;
017        
018        public SMJbiTypeImpl(org.apache.xmlbeans.SchemaType sType)
019        {
020            super(sType);
021        }
022        
023        private static final javax.xml.namespace.QName ENVIRONMENT$0 = 
024            new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/deployment-1.2", "environment");
025        
026        
027        /**
028         * Gets the "environment" element
029         */
030        public org.apache.geronimo.deployment.xbeans.EnvironmentType getEnvironment()
031        {
032            synchronized (monitor())
033            {
034                check_orphaned();
035                org.apache.geronimo.deployment.xbeans.EnvironmentType target = null;
036                target = (org.apache.geronimo.deployment.xbeans.EnvironmentType)get_store().find_element_user(ENVIRONMENT$0, 0);
037                if (target == null)
038                {
039                    return null;
040                }
041                return target;
042            }
043        }
044        
045        /**
046         * True if has "environment" element
047         */
048        public boolean isSetEnvironment()
049        {
050            synchronized (monitor())
051            {
052                check_orphaned();
053                return get_store().count_elements(ENVIRONMENT$0) != 0;
054            }
055        }
056        
057        /**
058         * Sets the "environment" element
059         */
060        public void setEnvironment(org.apache.geronimo.deployment.xbeans.EnvironmentType environment)
061        {
062            synchronized (monitor())
063            {
064                check_orphaned();
065                org.apache.geronimo.deployment.xbeans.EnvironmentType target = null;
066                target = (org.apache.geronimo.deployment.xbeans.EnvironmentType)get_store().find_element_user(ENVIRONMENT$0, 0);
067                if (target == null)
068                {
069                    target = (org.apache.geronimo.deployment.xbeans.EnvironmentType)get_store().add_element_user(ENVIRONMENT$0);
070                }
071                target.set(environment);
072            }
073        }
074        
075        /**
076         * Appends and returns a new empty "environment" element
077         */
078        public org.apache.geronimo.deployment.xbeans.EnvironmentType addNewEnvironment()
079        {
080            synchronized (monitor())
081            {
082                check_orphaned();
083                org.apache.geronimo.deployment.xbeans.EnvironmentType target = null;
084                target = (org.apache.geronimo.deployment.xbeans.EnvironmentType)get_store().add_element_user(ENVIRONMENT$0);
085                return target;
086            }
087        }
088        
089        /**
090         * Unsets the "environment" element
091         */
092        public void unsetEnvironment()
093        {
094            synchronized (monitor())
095            {
096                check_orphaned();
097                get_store().remove_element(ENVIRONMENT$0, 0);
098            }
099        }
100    }