001    /*
002     * XML Type:  outbound-resourceadapterType
003     * Namespace: http://geronimo.apache.org/xml/ns/j2ee/connector-1.2
004     * Java type: org.apache.geronimo.xbeans.geronimo.GerOutboundResourceadapterType
005     *
006     * Automatically generated - do not modify.
007     */
008    package org.apache.geronimo.xbeans.geronimo.impl;
009    /**
010     * An XML outbound-resourceadapterType(@http://geronimo.apache.org/xml/ns/j2ee/connector-1.2).
011     *
012     * This is a complex type.
013     */
014    public class GerOutboundResourceadapterTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.geronimo.xbeans.geronimo.GerOutboundResourceadapterType
015    {
016        
017        public GerOutboundResourceadapterTypeImpl(org.apache.xmlbeans.SchemaType sType)
018        {
019            super(sType);
020        }
021        
022        private static final javax.xml.namespace.QName CONNECTIONDEFINITION$0 = 
023            new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/j2ee/connector-1.2", "connection-definition");
024        
025        
026        /**
027         * Gets array of all "connection-definition" elements
028         */
029        public org.apache.geronimo.xbeans.geronimo.GerConnectionDefinitionType[] getConnectionDefinitionArray()
030        {
031            synchronized (monitor())
032            {
033                check_orphaned();
034                java.util.List targetList = new java.util.ArrayList();
035                get_store().find_all_element_users(CONNECTIONDEFINITION$0, targetList);
036                org.apache.geronimo.xbeans.geronimo.GerConnectionDefinitionType[] result = new org.apache.geronimo.xbeans.geronimo.GerConnectionDefinitionType[targetList.size()];
037                targetList.toArray(result);
038                return result;
039            }
040        }
041        
042        /**
043         * Gets ith "connection-definition" element
044         */
045        public org.apache.geronimo.xbeans.geronimo.GerConnectionDefinitionType getConnectionDefinitionArray(int i)
046        {
047            synchronized (monitor())
048            {
049                check_orphaned();
050                org.apache.geronimo.xbeans.geronimo.GerConnectionDefinitionType target = null;
051                target = (org.apache.geronimo.xbeans.geronimo.GerConnectionDefinitionType)get_store().find_element_user(CONNECTIONDEFINITION$0, i);
052                if (target == null)
053                {
054                    throw new IndexOutOfBoundsException();
055                }
056                return target;
057            }
058        }
059        
060        /**
061         * Returns number of "connection-definition" element
062         */
063        public int sizeOfConnectionDefinitionArray()
064        {
065            synchronized (monitor())
066            {
067                check_orphaned();
068                return get_store().count_elements(CONNECTIONDEFINITION$0);
069            }
070        }
071        
072        /**
073         * Sets array of all "connection-definition" element
074         */
075        public void setConnectionDefinitionArray(org.apache.geronimo.xbeans.geronimo.GerConnectionDefinitionType[] connectionDefinitionArray)
076        {
077            synchronized (monitor())
078            {
079                check_orphaned();
080                arraySetterHelper(connectionDefinitionArray, CONNECTIONDEFINITION$0);
081            }
082        }
083        
084        /**
085         * Sets ith "connection-definition" element
086         */
087        public void setConnectionDefinitionArray(int i, org.apache.geronimo.xbeans.geronimo.GerConnectionDefinitionType connectionDefinition)
088        {
089            synchronized (monitor())
090            {
091                check_orphaned();
092                org.apache.geronimo.xbeans.geronimo.GerConnectionDefinitionType target = null;
093                target = (org.apache.geronimo.xbeans.geronimo.GerConnectionDefinitionType)get_store().find_element_user(CONNECTIONDEFINITION$0, i);
094                if (target == null)
095                {
096                    throw new IndexOutOfBoundsException();
097                }
098                target.set(connectionDefinition);
099            }
100        }
101        
102        /**
103         * Inserts and returns a new empty value (as xml) as the ith "connection-definition" element
104         */
105        public org.apache.geronimo.xbeans.geronimo.GerConnectionDefinitionType insertNewConnectionDefinition(int i)
106        {
107            synchronized (monitor())
108            {
109                check_orphaned();
110                org.apache.geronimo.xbeans.geronimo.GerConnectionDefinitionType target = null;
111                target = (org.apache.geronimo.xbeans.geronimo.GerConnectionDefinitionType)get_store().insert_element_user(CONNECTIONDEFINITION$0, i);
112                return target;
113            }
114        }
115        
116        /**
117         * Appends and returns a new empty value (as xml) as the last "connection-definition" element
118         */
119        public org.apache.geronimo.xbeans.geronimo.GerConnectionDefinitionType addNewConnectionDefinition()
120        {
121            synchronized (monitor())
122            {
123                check_orphaned();
124                org.apache.geronimo.xbeans.geronimo.GerConnectionDefinitionType target = null;
125                target = (org.apache.geronimo.xbeans.geronimo.GerConnectionDefinitionType)get_store().add_element_user(CONNECTIONDEFINITION$0);
126                return target;
127            }
128        }
129        
130        /**
131         * Removes the ith "connection-definition" element
132         */
133        public void removeConnectionDefinition(int i)
134        {
135            synchronized (monitor())
136            {
137                check_orphaned();
138                get_store().remove_element(CONNECTIONDEFINITION$0, i);
139            }
140        }
141    }