| 1 | // |
| 2 | // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833 |
| 3 | // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> |
| 4 | // Any modifications to this file will be lost upon recompilation of the source schema. |
| 5 | // Generated on: 2010.06.29 at 05:55:18 PM CEST |
| 6 | // |
| 7 | |
| 8 | |
| 9 | package org.jomc.standalone.model; |
| 10 | |
| 11 | import java.io.ByteArrayInputStream; |
| 12 | import java.io.ByteArrayOutputStream; |
| 13 | import java.io.IOException; |
| 14 | import java.io.InvalidClassException; |
| 15 | import java.io.NotSerializableException; |
| 16 | import java.io.ObjectInputStream; |
| 17 | import java.io.ObjectOutputStream; |
| 18 | import java.io.OptionalDataException; |
| 19 | import java.io.Serializable; |
| 20 | import java.io.StreamCorruptedException; |
| 21 | import java.lang.reflect.Array; |
| 22 | import java.lang.reflect.InvocationTargetException; |
| 23 | import java.math.BigDecimal; |
| 24 | import java.math.BigInteger; |
| 25 | import java.util.ArrayList; |
| 26 | import java.util.Calendar; |
| 27 | import java.util.Currency; |
| 28 | import java.util.Date; |
| 29 | import java.util.HashMap; |
| 30 | import java.util.Iterator; |
| 31 | import java.util.List; |
| 32 | import java.util.Locale; |
| 33 | import java.util.Map; |
| 34 | import java.util.TimeZone; |
| 35 | import java.util.UUID; |
| 36 | import javax.annotation.Generated; |
| 37 | import javax.xml.bind.JAXBElement; |
| 38 | import javax.xml.bind.annotation.XmlAccessType; |
| 39 | import javax.xml.bind.annotation.XmlAccessorType; |
| 40 | import javax.xml.bind.annotation.XmlAnyAttribute; |
| 41 | import javax.xml.bind.annotation.XmlAnyElement; |
| 42 | import javax.xml.bind.annotation.XmlAttribute; |
| 43 | import javax.xml.bind.annotation.XmlType; |
| 44 | import javax.xml.datatype.Duration; |
| 45 | import javax.xml.datatype.XMLGregorianCalendar; |
| 46 | import javax.xml.namespace.QName; |
| 47 | import org.w3c.dom.Element; |
| 48 | |
| 49 | |
| 50 | /** |
| 51 | * |
| 52 | * Model of a transaction. |
| 53 | * |
| 54 | * The 'TransactionType' type defines attribute 'type' holding the type of the transaction. |
| 55 | * |
| 56 | * |
| 57 | * <p>Java class for TransactionType complex type. |
| 58 | * |
| 59 | * <p>The following schema fragment specifies the expected content contained within this class. |
| 60 | * |
| 61 | * <pre> |
| 62 | * <complexType name="TransactionType"> |
| 63 | * <complexContent> |
| 64 | * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> |
| 65 | * <sequence> |
| 66 | * <any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/> |
| 67 | * </sequence> |
| 68 | * <attribute name="type" use="required" type="{http://jomc.org/standalone/model}TransactionAttributeType" /> |
| 69 | * <anyAttribute processContents='lax'/> |
| 70 | * </restriction> |
| 71 | * </complexContent> |
| 72 | * </complexType> |
| 73 | * </pre> |
| 74 | * |
| 75 | * |
| 76 | */ |
| 77 | @XmlAccessorType(XmlAccessType.FIELD) |
| 78 | @XmlType(name = "TransactionType", propOrder = { |
| 79 | "any" |
| 80 | }) |
| 81 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833") |
| 82 | public class TransactionType implements Cloneable |
| 83 | { |
| 84 | |
| 85 | @XmlAnyElement(lax = true) |
| 86 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833") |
| 87 | protected List<Object> any; |
| 88 | @XmlAttribute(required = true) |
| 89 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833") |
| 90 | protected TransactionAttributeType type; |
| 91 | @XmlAnyAttribute |
| 92 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833") |
| 93 | private Map<QName, String> otherAttributes = new HashMap<QName, String>(); |
| 94 | |
| 95 | /** |
| 96 | * Creates a new {@code TransactionType} instance. |
| 97 | * |
| 98 | */ |
| 99 | public TransactionType() { |
| 100 | // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000 |
| 101 | super(); |
| 102 | } |
| 103 | |
| 104 | /** |
| 105 | * Creates a new {@code TransactionType} instance by deeply copying a given {@code TransactionType} instance. |
| 106 | * |
| 107 | * |
| 108 | * @param o |
| 109 | * The instance to copy. |
| 110 | * @throws NullPointerException |
| 111 | * if {@code o} is {@code null}. |
| 112 | */ |
| 113 | public TransactionType(final TransactionType o) { |
| 114 | // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000 |
| 115 | super(); |
| 116 | if (o == null) { |
| 117 | throw new NullPointerException("Cannot create a copy of 'TransactionType' from 'null'."); |
| 118 | } |
| 119 | // 'Any' collection. |
| 120 | copyAny(o.getAny(), getAny()); |
| 121 | // CEnumLeafInfo: org.jomc.standalone.model.TransactionAttributeType |
| 122 | this.type = o.getType(); |
| 123 | // Other attributes. |
| 124 | this.otherAttributes.putAll(o.otherAttributes); |
| 125 | } |
| 126 | |
| 127 | /** |
| 128 | * Gets the value of the any property. |
| 129 | * |
| 130 | * <p> |
| 131 | * This accessor method returns a reference to the live list, |
| 132 | * not a snapshot. Therefore any modification you make to the |
| 133 | * returned list will be present inside the JAXB object. |
| 134 | * This is why there is not a <CODE>set</CODE> method for the any property. |
| 135 | * |
| 136 | * <p> |
| 137 | * For example, to add a new item, do as follows: |
| 138 | * <pre> |
| 139 | * getAny().add(newItem); |
| 140 | * </pre> |
| 141 | * |
| 142 | * |
| 143 | * <p> |
| 144 | * Objects of the following type(s) are allowed in the list |
| 145 | * {@link Element } |
| 146 | * {@link Object } |
| 147 | * |
| 148 | * |
| 149 | */ |
| 150 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833") |
| 151 | public List<Object> getAny() { |
| 152 | if (any == null) { |
| 153 | any = new ArrayList<Object>(); |
| 154 | } |
| 155 | return this.any; |
| 156 | } |
| 157 | |
| 158 | /** |
| 159 | * Type of the transaction. |
| 160 | * |
| 161 | * @return |
| 162 | * possible object is |
| 163 | * {@link TransactionAttributeType } |
| 164 | * |
| 165 | */ |
| 166 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833") |
| 167 | public TransactionAttributeType getType() { |
| 168 | return type; |
| 169 | } |
| 170 | |
| 171 | /** |
| 172 | * Sets the value of the type property. |
| 173 | * |
| 174 | * @param value |
| 175 | * allowed object is |
| 176 | * {@link TransactionAttributeType } |
| 177 | * |
| 178 | */ |
| 179 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833") |
| 180 | public void setType(TransactionAttributeType value) { |
| 181 | this.type = value; |
| 182 | } |
| 183 | |
| 184 | /** |
| 185 | * Gets a map that contains attributes that aren't bound to any typed property on this class. |
| 186 | * |
| 187 | * <p> |
| 188 | * the map is keyed by the name of the attribute and |
| 189 | * the value is the string value of the attribute. |
| 190 | * |
| 191 | * the map returned by this method is live, and you can add new attribute |
| 192 | * by updating the map directly. Because of this design, there's no setter. |
| 193 | * |
| 194 | * |
| 195 | * @return |
| 196 | * always non-null |
| 197 | */ |
| 198 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833") |
| 199 | public Map<QName, String> getOtherAttributes() { |
| 200 | return otherAttributes; |
| 201 | } |
| 202 | |
| 203 | /** |
| 204 | * Copies all values of property {@code Any} deeply. |
| 205 | * |
| 206 | * @param target |
| 207 | * The target to copy {@code source} to. |
| 208 | * @param source |
| 209 | * The source to copy from. |
| 210 | * @throws NullPointerException |
| 211 | * if {@code source} or {@code target} is {@code null}. |
| 212 | */ |
| 213 | @SuppressWarnings("unchecked") |
| 214 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833") |
| 215 | private static void copyAny(final List<Object> source, final List<Object> target) { |
| 216 | // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000 |
| 217 | if (!source.isEmpty()) { |
| 218 | for (Iterator it = source.iterator(); it.hasNext(); ) { |
| 219 | final Object next = it.next(); |
| 220 | if (next instanceof Element) { |
| 221 | // CWildcardTypeInfo: org.w3c.dom.Element |
| 222 | target.add(((Element)((Element) next).cloneNode(true))); |
| 223 | continue; |
| 224 | } |
| 225 | if (next instanceof Object) { |
| 226 | // CBuiltinLeafInfo: java.lang.Object |
| 227 | target.add(copyOfObject(((Object) next))); |
| 228 | continue; |
| 229 | } |
| 230 | // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/ |
| 231 | throw new AssertionError((("Unexpected instance '"+ next)+"' for property 'Any' of class 'org.jomc.standalone.model.TransactionType'.")); |
| 232 | } |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | /** |
| 237 | * Creates and returns a deep copy of a given object. |
| 238 | * |
| 239 | * @param o |
| 240 | * The instance to copy or {@code null}. |
| 241 | * @return |
| 242 | * A deep copy of {@code o} or {@code null} if {@code o} is {@code null}. |
| 243 | */ |
| 244 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833") |
| 245 | private static Object copyOfObject(final Object o) { |
| 246 | // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000 |
| 247 | if (o!= null) { |
| 248 | if (o.getClass().isPrimitive()) { |
| 249 | return o; |
| 250 | } |
| 251 | if (o.getClass().isArray()) { |
| 252 | return copyOfArray(o); |
| 253 | } |
| 254 | if (o instanceof Boolean) { |
| 255 | return o; |
| 256 | } |
| 257 | if (o instanceof Byte) { |
| 258 | return o; |
| 259 | } |
| 260 | if (o instanceof Character) { |
| 261 | return o; |
| 262 | } |
| 263 | if (o instanceof Double) { |
| 264 | return o; |
| 265 | } |
| 266 | if (o instanceof Enum) { |
| 267 | return o; |
| 268 | } |
| 269 | if (o instanceof Float) { |
| 270 | return o; |
| 271 | } |
| 272 | if (o instanceof Integer) { |
| 273 | return o; |
| 274 | } |
| 275 | if (o instanceof Long) { |
| 276 | return o; |
| 277 | } |
| 278 | if (o instanceof Short) { |
| 279 | return o; |
| 280 | } |
| 281 | if (o instanceof String) { |
| 282 | return o; |
| 283 | } |
| 284 | if (o instanceof BigDecimal) { |
| 285 | return o; |
| 286 | } |
| 287 | if (o instanceof BigInteger) { |
| 288 | return o; |
| 289 | } |
| 290 | if (o instanceof UUID) { |
| 291 | return o; |
| 292 | } |
| 293 | if (o instanceof QName) { |
| 294 | return o; |
| 295 | } |
| 296 | if (o instanceof Duration) { |
| 297 | return o; |
| 298 | } |
| 299 | if (o instanceof Currency) { |
| 300 | return o; |
| 301 | } |
| 302 | if (o instanceof XMLGregorianCalendar) { |
| 303 | return ((XMLGregorianCalendar) o).clone(); |
| 304 | } |
| 305 | if (o instanceof Date) { |
| 306 | return ((Date) o).clone(); |
| 307 | } |
| 308 | if (o instanceof Calendar) { |
| 309 | return ((Calendar) o).clone(); |
| 310 | } |
| 311 | if (o instanceof TimeZone) { |
| 312 | return ((TimeZone) o).clone(); |
| 313 | } |
| 314 | if (o instanceof Locale) { |
| 315 | return ((Locale) o).clone(); |
| 316 | } |
| 317 | if (o instanceof Element) { |
| 318 | return ((Element)((Element) o).cloneNode(true)); |
| 319 | } |
| 320 | if (o instanceof JAXBElement) { |
| 321 | return copyOFJAXBElement(((JAXBElement) o)); |
| 322 | } |
| 323 | try { |
| 324 | return o.getClass().getMethod("clone", ((Class[]) null)).invoke(o, ((Object[]) null)); |
| 325 | } catch (NoSuchMethodException e) { |
| 326 | if (o instanceof Serializable) { |
| 327 | return copyOfSerializable(((Serializable) o)); |
| 328 | } |
| 329 | // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/ |
| 330 | throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e)); |
| 331 | } catch (IllegalAccessException e) { |
| 332 | // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/ |
| 333 | throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e)); |
| 334 | } catch (InvocationTargetException e) { |
| 335 | // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/ |
| 336 | throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e)); |
| 337 | } catch (SecurityException e) { |
| 338 | // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/ |
| 339 | throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e)); |
| 340 | } catch (IllegalArgumentException e) { |
| 341 | // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/ |
| 342 | throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e)); |
| 343 | } catch (ExceptionInInitializerError e) { |
| 344 | // Please report this at https://apps.sourceforge.net/mantisbt/ccxjc/ |
| 345 | throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ o)+"'.")).initCause(e)); |
| 346 | } |
| 347 | } |
| 348 | return null; |
| 349 | } |
| 350 | |
| 351 | /** |
| 352 | * Creates and returns a deep copy of a given array. |
| 353 | * |
| 354 | * @param array |
| 355 | * The array to copy or {@code null}. |
| 356 | * @return |
| 357 | * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}. |
| 358 | */ |
| 359 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833") |
| 360 | private static Object copyOfArray(final Object array) { |
| 361 | // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000 |
| 362 | if (array!= null) { |
| 363 | if (array.getClass() == boolean[].class) { |
| 364 | return copyOf(((boolean[]) array)); |
| 365 | } |
| 366 | if (array.getClass() == byte[].class) { |
| 367 | return copyOf(((byte[]) array)); |
| 368 | } |
| 369 | if (array.getClass() == char[].class) { |
| 370 | return copyOf(((char[]) array)); |
| 371 | } |
| 372 | if (array.getClass() == double[].class) { |
| 373 | return copyOf(((double[]) array)); |
| 374 | } |
| 375 | if (array.getClass() == float[].class) { |
| 376 | return copyOf(((float[]) array)); |
| 377 | } |
| 378 | if (array.getClass() == int[].class) { |
| 379 | return copyOf(((int[]) array)); |
| 380 | } |
| 381 | if (array.getClass() == long[].class) { |
| 382 | return copyOf(((long[]) array)); |
| 383 | } |
| 384 | if (array.getClass() == short[].class) { |
| 385 | return copyOf(((short[]) array)); |
| 386 | } |
| 387 | final int len = Array.getLength(array); |
| 388 | final Object copy = Array.newInstance(array.getClass().getComponentType(), len); |
| 389 | for (int i = (len- 1); (i >= 0); i--) { |
| 390 | Array.set(copy, i, copyOfObject(Array.get(array, i))); |
| 391 | } |
| 392 | return copy; |
| 393 | } |
| 394 | return null; |
| 395 | } |
| 396 | |
| 397 | /** |
| 398 | * Creates and returns a deep copy of a given array. |
| 399 | * |
| 400 | * @param array |
| 401 | * The array to copy or {@code null}. |
| 402 | * @return |
| 403 | * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}. |
| 404 | */ |
| 405 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833") |
| 406 | private static boolean[] copyOf(final boolean[] array) { |
| 407 | // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000 |
| 408 | if (array!= null) { |
| 409 | final boolean[] copy = ((boolean[]) Array.newInstance(array.getClass().getComponentType(), array.length)); |
| 410 | System.arraycopy(array, 0, copy, 0, array.length); |
| 411 | return copy; |
| 412 | } |
| 413 | return null; |
| 414 | } |
| 415 | |
| 416 | /** |
| 417 | * Creates and returns a deep copy of a given array. |
| 418 | * |
| 419 | * @param array |
| 420 | * The array to copy or {@code null}. |
| 421 | * @return |
| 422 | * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}. |
| 423 | */ |
| 424 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833") |
| 425 | private static byte[] copyOf(final byte[] array) { |
| 426 | // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000 |
| 427 | if (array!= null) { |
| 428 | final byte[] copy = ((byte[]) Array.newInstance(array.getClass().getComponentType(), array.length)); |
| 429 | System.arraycopy(array, 0, copy, 0, array.length); |
| 430 | return copy; |
| 431 | } |
| 432 | return null; |
| 433 | } |
| 434 | |
| 435 | /** |
| 436 | * Creates and returns a deep copy of a given array. |
| 437 | * |
| 438 | * @param array |
| 439 | * The array to copy or {@code null}. |
| 440 | * @return |
| 441 | * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}. |
| 442 | */ |
| 443 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833") |
| 444 | private static char[] copyOf(final char[] array) { |
| 445 | // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000 |
| 446 | if (array!= null) { |
| 447 | final char[] copy = ((char[]) Array.newInstance(array.getClass().getComponentType(), array.length)); |
| 448 | System.arraycopy(array, 0, copy, 0, array.length); |
| 449 | return copy; |
| 450 | } |
| 451 | return null; |
| 452 | } |
| 453 | |
| 454 | /** |
| 455 | * Creates and returns a deep copy of a given array. |
| 456 | * |
| 457 | * @param array |
| 458 | * The array to copy or {@code null}. |
| 459 | * @return |
| 460 | * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}. |
| 461 | */ |
| 462 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833") |
| 463 | private static double[] copyOf(final double[] array) { |
| 464 | // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000 |
| 465 | if (array!= null) { |
| 466 | final double[] copy = ((double[]) Array.newInstance(array.getClass().getComponentType(), array.length)); |
| 467 | System.arraycopy(array, 0, copy, 0, array.length); |
| 468 | return copy; |
| 469 | } |
| 470 | return null; |
| 471 | } |
| 472 | |
| 473 | /** |
| 474 | * Creates and returns a deep copy of a given array. |
| 475 | * |
| 476 | * @param array |
| 477 | * The array to copy or {@code null}. |
| 478 | * @return |
| 479 | * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}. |
| 480 | */ |
| 481 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833") |
| 482 | private static float[] copyOf(final float[] array) { |
| 483 | // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000 |
| 484 | if (array!= null) { |
| 485 | final float[] copy = ((float[]) Array.newInstance(array.getClass().getComponentType(), array.length)); |
| 486 | System.arraycopy(array, 0, copy, 0, array.length); |
| 487 | return copy; |
| 488 | } |
| 489 | return null; |
| 490 | } |
| 491 | |
| 492 | /** |
| 493 | * Creates and returns a deep copy of a given array. |
| 494 | * |
| 495 | * @param array |
| 496 | * The array to copy or {@code null}. |
| 497 | * @return |
| 498 | * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}. |
| 499 | */ |
| 500 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833") |
| 501 | private static int[] copyOf(final int[] array) { |
| 502 | // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000 |
| 503 | if (array!= null) { |
| 504 | final int[] copy = ((int[]) Array.newInstance(array.getClass().getComponentType(), array.length)); |
| 505 | System.arraycopy(array, 0, copy, 0, array.length); |
| 506 | return copy; |
| 507 | } |
| 508 | return null; |
| 509 | } |
| 510 | |
| 511 | /** |
| 512 | * Creates and returns a deep copy of a given array. |
| 513 | * |
| 514 | * @param array |
| 515 | * The array to copy or {@code null}. |
| 516 | * @return |
| 517 | * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}. |
| 518 | */ |
| 519 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833") |
| 520 | private static long[] copyOf(final long[] array) { |
| 521 | // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000 |
| 522 | if (array!= null) { |
| 523 | final long[] copy = ((long[]) Array.newInstance(array.getClass().getComponentType(), array.length)); |
| 524 | System.arraycopy(array, 0, copy, 0, array.length); |
| 525 | return copy; |
| 526 | } |
| 527 | return null; |
| 528 | } |
| 529 | |
| 530 | /** |
| 531 | * Creates and returns a deep copy of a given array. |
| 532 | * |
| 533 | * @param array |
| 534 | * The array to copy or {@code null}. |
| 535 | * @return |
| 536 | * A deep copy of {@code array} or {@code null} if {@code array} is {@code null}. |
| 537 | */ |
| 538 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833") |
| 539 | private static short[] copyOf(final short[] array) { |
| 540 | // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000 |
| 541 | if (array!= null) { |
| 542 | final short[] copy = ((short[]) Array.newInstance(array.getClass().getComponentType(), array.length)); |
| 543 | System.arraycopy(array, 0, copy, 0, array.length); |
| 544 | return copy; |
| 545 | } |
| 546 | return null; |
| 547 | } |
| 548 | |
| 549 | /** |
| 550 | * Creates and returns a deep copy of a given {@code JAXBElement} instance. |
| 551 | * |
| 552 | * @param element |
| 553 | * The instance to copy or {@code null}. |
| 554 | * @return |
| 555 | * A deep copy of {@code element} or {@code null} if {@code element} is {@code null}. |
| 556 | */ |
| 557 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833") |
| 558 | private static JAXBElement copyOFJAXBElement(final JAXBElement element) { |
| 559 | // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000 |
| 560 | if (element!= null) { |
| 561 | final JAXBElement copy = new JAXBElement(element.getName(), element.getDeclaredType(), element.getScope(), element.getValue()); |
| 562 | copy.setNil(element.isNil()); |
| 563 | copy.setValue(copyOfObject(copy.getValue())); |
| 564 | return copy; |
| 565 | } |
| 566 | return null; |
| 567 | } |
| 568 | |
| 569 | /** |
| 570 | * Creates and returns a deep copy of a given {@code Serializable}. |
| 571 | * |
| 572 | * @param serializable |
| 573 | * The instance to copy or {@code null}. |
| 574 | * @return |
| 575 | * A deep copy of {@code serializable} or {@code null} if {@code serializable} is {@code null}. |
| 576 | */ |
| 577 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833") |
| 578 | private static Serializable copyOfSerializable(final Serializable serializable) { |
| 579 | // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000 |
| 580 | if (serializable!= null) { |
| 581 | try { |
| 582 | final ByteArrayOutputStream byteArrayOutput = new ByteArrayOutputStream(); |
| 583 | final ObjectOutputStream out = new ObjectOutputStream(byteArrayOutput); |
| 584 | out.writeObject(serializable); |
| 585 | out.close(); |
| 586 | final ByteArrayInputStream byteArrayInput = new ByteArrayInputStream(byteArrayOutput.toByteArray()); |
| 587 | final ObjectInputStream in = new ObjectInputStream(byteArrayInput); |
| 588 | final Serializable copy = ((Serializable) in.readObject()); |
| 589 | in.close(); |
| 590 | return copy; |
| 591 | } catch (SecurityException e) { |
| 592 | throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e)); |
| 593 | } catch (ClassNotFoundException e) { |
| 594 | throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e)); |
| 595 | } catch (InvalidClassException e) { |
| 596 | throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e)); |
| 597 | } catch (NotSerializableException e) { |
| 598 | throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e)); |
| 599 | } catch (StreamCorruptedException e) { |
| 600 | throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e)); |
| 601 | } catch (OptionalDataException e) { |
| 602 | throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e)); |
| 603 | } catch (IOException e) { |
| 604 | throw((AssertionError) new AssertionError((("Unexpected instance during copying object '"+ serializable)+"'.")).initCause(e)); |
| 605 | } |
| 606 | } |
| 607 | return null; |
| 608 | } |
| 609 | |
| 610 | /** |
| 611 | * Creates and returns a deep copy of this object. |
| 612 | * |
| 613 | * |
| 614 | * @return |
| 615 | * A deep copy of this object. |
| 616 | */ |
| 617 | @Override |
| 618 | @Generated(value = "com.sun.tools.xjc.Driver", date = "2010-06-29T05:55:18+02:00", comments = "JAXB RI vhudson-jaxb-ri-2.1-833") |
| 619 | public TransactionType clone() { |
| 620 | // CC-XJC Version 1.3 Build 2010-02-27T15:04:03+0000 |
| 621 | return new TransactionType(this); |
| 622 | } |
| 623 | |
| 624 | } |