001 /* 002 * XML Type: connection-definitionType 003 * Namespace: http://geronimo.apache.org/xml/ns/j2ee/connector-1.2 004 * Java type: org.apache.geronimo.xbeans.geronimo.GerConnectionDefinitionType 005 * 006 * Automatically generated - do not modify. 007 */ 008 package org.apache.geronimo.xbeans.geronimo.impl; 009 /** 010 * An XML connection-definitionType(@http://geronimo.apache.org/xml/ns/j2ee/connector-1.2). 011 * 012 * This is a complex type. 013 */ 014 public class GerConnectionDefinitionTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.geronimo.xbeans.geronimo.GerConnectionDefinitionType 015 { 016 017 public GerConnectionDefinitionTypeImpl(org.apache.xmlbeans.SchemaType sType) 018 { 019 super(sType); 020 } 021 022 private static final javax.xml.namespace.QName CONNECTIONFACTORYINTERFACE$0 = 023 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/j2ee/connector-1.2", "connectionfactory-interface"); 024 private static final javax.xml.namespace.QName CONNECTIONDEFINITIONINSTANCE$2 = 025 new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/j2ee/connector-1.2", "connectiondefinition-instance"); 026 027 028 /** 029 * Gets the "connectionfactory-interface" element 030 */ 031 public java.lang.String getConnectionfactoryInterface() 032 { 033 synchronized (monitor()) 034 { 035 check_orphaned(); 036 org.apache.xmlbeans.SimpleValue target = null; 037 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CONNECTIONFACTORYINTERFACE$0, 0); 038 if (target == null) 039 { 040 return null; 041 } 042 return target.getStringValue(); 043 } 044 } 045 046 /** 047 * Gets (as xml) the "connectionfactory-interface" element 048 */ 049 public org.apache.geronimo.xbeans.geronimo.GerFullyQualifiedClassType xgetConnectionfactoryInterface() 050 { 051 synchronized (monitor()) 052 { 053 check_orphaned(); 054 org.apache.geronimo.xbeans.geronimo.GerFullyQualifiedClassType target = null; 055 target = (org.apache.geronimo.xbeans.geronimo.GerFullyQualifiedClassType)get_store().find_element_user(CONNECTIONFACTORYINTERFACE$0, 0); 056 return target; 057 } 058 } 059 060 /** 061 * Sets the "connectionfactory-interface" element 062 */ 063 public void setConnectionfactoryInterface(java.lang.String connectionfactoryInterface) 064 { 065 synchronized (monitor()) 066 { 067 check_orphaned(); 068 org.apache.xmlbeans.SimpleValue target = null; 069 target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CONNECTIONFACTORYINTERFACE$0, 0); 070 if (target == null) 071 { 072 target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(CONNECTIONFACTORYINTERFACE$0); 073 } 074 target.setStringValue(connectionfactoryInterface); 075 } 076 } 077 078 /** 079 * Sets (as xml) the "connectionfactory-interface" element 080 */ 081 public void xsetConnectionfactoryInterface(org.apache.geronimo.xbeans.geronimo.GerFullyQualifiedClassType connectionfactoryInterface) 082 { 083 synchronized (monitor()) 084 { 085 check_orphaned(); 086 org.apache.geronimo.xbeans.geronimo.GerFullyQualifiedClassType target = null; 087 target = (org.apache.geronimo.xbeans.geronimo.GerFullyQualifiedClassType)get_store().find_element_user(CONNECTIONFACTORYINTERFACE$0, 0); 088 if (target == null) 089 { 090 target = (org.apache.geronimo.xbeans.geronimo.GerFullyQualifiedClassType)get_store().add_element_user(CONNECTIONFACTORYINTERFACE$0); 091 } 092 target.set(connectionfactoryInterface); 093 } 094 } 095 096 /** 097 * Gets array of all "connectiondefinition-instance" elements 098 */ 099 public org.apache.geronimo.xbeans.geronimo.GerConnectiondefinitionInstanceType[] getConnectiondefinitionInstanceArray() 100 { 101 synchronized (monitor()) 102 { 103 check_orphaned(); 104 java.util.List targetList = new java.util.ArrayList(); 105 get_store().find_all_element_users(CONNECTIONDEFINITIONINSTANCE$2, targetList); 106 org.apache.geronimo.xbeans.geronimo.GerConnectiondefinitionInstanceType[] result = new org.apache.geronimo.xbeans.geronimo.GerConnectiondefinitionInstanceType[targetList.size()]; 107 targetList.toArray(result); 108 return result; 109 } 110 } 111 112 /** 113 * Gets ith "connectiondefinition-instance" element 114 */ 115 public org.apache.geronimo.xbeans.geronimo.GerConnectiondefinitionInstanceType getConnectiondefinitionInstanceArray(int i) 116 { 117 synchronized (monitor()) 118 { 119 check_orphaned(); 120 org.apache.geronimo.xbeans.geronimo.GerConnectiondefinitionInstanceType target = null; 121 target = (org.apache.geronimo.xbeans.geronimo.GerConnectiondefinitionInstanceType)get_store().find_element_user(CONNECTIONDEFINITIONINSTANCE$2, i); 122 if (target == null) 123 { 124 throw new IndexOutOfBoundsException(); 125 } 126 return target; 127 } 128 } 129 130 /** 131 * Returns number of "connectiondefinition-instance" element 132 */ 133 public int sizeOfConnectiondefinitionInstanceArray() 134 { 135 synchronized (monitor()) 136 { 137 check_orphaned(); 138 return get_store().count_elements(CONNECTIONDEFINITIONINSTANCE$2); 139 } 140 } 141 142 /** 143 * Sets array of all "connectiondefinition-instance" element 144 */ 145 public void setConnectiondefinitionInstanceArray(org.apache.geronimo.xbeans.geronimo.GerConnectiondefinitionInstanceType[] connectiondefinitionInstanceArray) 146 { 147 synchronized (monitor()) 148 { 149 check_orphaned(); 150 arraySetterHelper(connectiondefinitionInstanceArray, CONNECTIONDEFINITIONINSTANCE$2); 151 } 152 } 153 154 /** 155 * Sets ith "connectiondefinition-instance" element 156 */ 157 public void setConnectiondefinitionInstanceArray(int i, org.apache.geronimo.xbeans.geronimo.GerConnectiondefinitionInstanceType connectiondefinitionInstance) 158 { 159 synchronized (monitor()) 160 { 161 check_orphaned(); 162 org.apache.geronimo.xbeans.geronimo.GerConnectiondefinitionInstanceType target = null; 163 target = (org.apache.geronimo.xbeans.geronimo.GerConnectiondefinitionInstanceType)get_store().find_element_user(CONNECTIONDEFINITIONINSTANCE$2, i); 164 if (target == null) 165 { 166 throw new IndexOutOfBoundsException(); 167 } 168 target.set(connectiondefinitionInstance); 169 } 170 } 171 172 /** 173 * Inserts and returns a new empty value (as xml) as the ith "connectiondefinition-instance" element 174 */ 175 public org.apache.geronimo.xbeans.geronimo.GerConnectiondefinitionInstanceType insertNewConnectiondefinitionInstance(int i) 176 { 177 synchronized (monitor()) 178 { 179 check_orphaned(); 180 org.apache.geronimo.xbeans.geronimo.GerConnectiondefinitionInstanceType target = null; 181 target = (org.apache.geronimo.xbeans.geronimo.GerConnectiondefinitionInstanceType)get_store().insert_element_user(CONNECTIONDEFINITIONINSTANCE$2, i); 182 return target; 183 } 184 } 185 186 /** 187 * Appends and returns a new empty value (as xml) as the last "connectiondefinition-instance" element 188 */ 189 public org.apache.geronimo.xbeans.geronimo.GerConnectiondefinitionInstanceType addNewConnectiondefinitionInstance() 190 { 191 synchronized (monitor()) 192 { 193 check_orphaned(); 194 org.apache.geronimo.xbeans.geronimo.GerConnectiondefinitionInstanceType target = null; 195 target = (org.apache.geronimo.xbeans.geronimo.GerConnectiondefinitionInstanceType)get_store().add_element_user(CONNECTIONDEFINITIONINSTANCE$2); 196 return target; 197 } 198 } 199 200 /** 201 * Removes the ith "connectiondefinition-instance" element 202 */ 203 public void removeConnectiondefinitionInstance(int i) 204 { 205 synchronized (monitor()) 206 { 207 check_orphaned(); 208 get_store().remove_element(CONNECTIONDEFINITIONINSTANCE$2, i); 209 } 210 } 211 }