001/*
002 * An XML document type.
003 * Localname: set
004 * Namespace: http://www.springframework.org/schema/beans
005 * Java type: org.springframework.schema.beans.SetDocument
006 *
007 * Automatically generated - do not modify.
008 */
009package org.springframework.schema.beans.impl;
010/**
011 * A document containing one set(@http://www.springframework.org/schema/beans) element.
012 *
013 * This is a complex type.
014 */
015public class SetDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.springframework.schema.beans.SetDocument
016{
017    private static final long serialVersionUID = 1L;
018    
019    public SetDocumentImpl(org.apache.xmlbeans.SchemaType sType)
020    {
021        super(sType);
022    }
023    
024    private static final javax.xml.namespace.QName SET$0 = 
025        new javax.xml.namespace.QName("http://www.springframework.org/schema/beans", "set");
026    
027    
028    /**
029     * Gets the "set" element
030     */
031    public org.springframework.schema.beans.SetDocument.Set getSet()
032    {
033        synchronized (monitor())
034        {
035            check_orphaned();
036            org.springframework.schema.beans.SetDocument.Set target = null;
037            target = (org.springframework.schema.beans.SetDocument.Set)get_store().find_element_user(SET$0, 0);
038            if (target == null)
039            {
040                return null;
041            }
042            return target;
043        }
044    }
045    
046    /**
047     * Sets the "set" element
048     */
049    public void setSet(org.springframework.schema.beans.SetDocument.Set set)
050    {
051        synchronized (monitor())
052        {
053            check_orphaned();
054            org.springframework.schema.beans.SetDocument.Set target = null;
055            target = (org.springframework.schema.beans.SetDocument.Set)get_store().find_element_user(SET$0, 0);
056            if (target == null)
057            {
058                target = (org.springframework.schema.beans.SetDocument.Set)get_store().add_element_user(SET$0);
059            }
060            target.set(set);
061        }
062    }
063    
064    /**
065     * Appends and returns a new empty "set" element
066     */
067    public org.springframework.schema.beans.SetDocument.Set addNewSet()
068    {
069        synchronized (monitor())
070        {
071            check_orphaned();
072            org.springframework.schema.beans.SetDocument.Set target = null;
073            target = (org.springframework.schema.beans.SetDocument.Set)get_store().add_element_user(SET$0);
074            return target;
075        }
076    }
077    /**
078     * An XML set(@http://www.springframework.org/schema/beans).
079     *
080     * This is a complex type.
081     */
082    public static class SetImpl extends org.springframework.schema.beans.impl.ListOrSetTypeImpl implements org.springframework.schema.beans.SetDocument.Set
083    {
084        private static final long serialVersionUID = 1L;
085        
086        public SetImpl(org.apache.xmlbeans.SchemaType sType)
087        {
088            super(sType);
089        }
090        
091        private static final javax.xml.namespace.QName MERGE$0 = 
092            new javax.xml.namespace.QName("", "merge");
093        
094        
095        /**
096         * Gets the "merge" attribute
097         */
098        public org.springframework.schema.beans.DefaultableBoolean.Enum getMerge()
099        {
100            synchronized (monitor())
101            {
102                check_orphaned();
103                org.apache.xmlbeans.SimpleValue target = null;
104                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(MERGE$0);
105                if (target == null)
106                {
107                    target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(MERGE$0);
108                }
109                if (target == null)
110                {
111                    return null;
112                }
113                return (org.springframework.schema.beans.DefaultableBoolean.Enum)target.getEnumValue();
114            }
115        }
116        
117        /**
118         * Gets (as xml) the "merge" attribute
119         */
120        public org.springframework.schema.beans.DefaultableBoolean xgetMerge()
121        {
122            synchronized (monitor())
123            {
124                check_orphaned();
125                org.springframework.schema.beans.DefaultableBoolean target = null;
126                target = (org.springframework.schema.beans.DefaultableBoolean)get_store().find_attribute_user(MERGE$0);
127                if (target == null)
128                {
129                    target = (org.springframework.schema.beans.DefaultableBoolean)get_default_attribute_value(MERGE$0);
130                }
131                return target;
132            }
133        }
134        
135        /**
136         * True if has "merge" attribute
137         */
138        public boolean isSetMerge()
139        {
140            synchronized (monitor())
141            {
142                check_orphaned();
143                return get_store().find_attribute_user(MERGE$0) != null;
144            }
145        }
146        
147        /**
148         * Sets the "merge" attribute
149         */
150        public void setMerge(org.springframework.schema.beans.DefaultableBoolean.Enum merge)
151        {
152            synchronized (monitor())
153            {
154                check_orphaned();
155                org.apache.xmlbeans.SimpleValue target = null;
156                target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(MERGE$0);
157                if (target == null)
158                {
159                    target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(MERGE$0);
160                }
161                target.setEnumValue(merge);
162            }
163        }
164        
165        /**
166         * Sets (as xml) the "merge" attribute
167         */
168        public void xsetMerge(org.springframework.schema.beans.DefaultableBoolean merge)
169        {
170            synchronized (monitor())
171            {
172                check_orphaned();
173                org.springframework.schema.beans.DefaultableBoolean target = null;
174                target = (org.springframework.schema.beans.DefaultableBoolean)get_store().find_attribute_user(MERGE$0);
175                if (target == null)
176                {
177                    target = (org.springframework.schema.beans.DefaultableBoolean)get_store().add_attribute_user(MERGE$0);
178                }
179                target.set(merge);
180            }
181        }
182        
183        /**
184         * Unsets the "merge" attribute
185         */
186        public void unsetMerge()
187        {
188            synchronized (monitor())
189            {
190                check_orphaned();
191                get_store().remove_attribute(MERGE$0);
192            }
193        }
194    }
195}