OPENJPA-834 fix xmlmapping testcase

committing patch provided by Milosz Tylenda

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@734828 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Catalina Wei 2009-01-15 21:29:31 +00:00
parent 696388049b
commit 9e78d8caae
1 changed files with 152 additions and 142 deletions

View File

@ -1,142 +1,152 @@
// //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.2-b01-fcs // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.0.2-b01-fcs
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema. // Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2006.10.04 at 03:08:16 PM PDT // Generated on: 2006.10.04 at 03:08:16 PM PDT
// //
package org.apache.openjpa.persistence.xmlmapping.xmlbindings.myaddress; package org.apache.openjpa.persistence.xmlmapping.xmlbindings.myaddress;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
/** /**
* <p>Java class for Address complex type. * <p>Java class for Address complex type.
* *
* <p>The following schema fragment specifies the expected content contained within this class. * <p>The following schema fragment specifies the expected content contained within this class.
* *
* <pre> * <pre>
* &lt;complexType name="Address"> * &lt;complexType name="Address">
* &lt;complexContent> * &lt;complexContent>
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* &lt;sequence> * &lt;sequence>
* &lt;element name="Name" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;element name="Name" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;element name="Street" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="3"/> * &lt;element name="Street" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="3"/>
* &lt;element name="City" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;element name="City" type="{http://www.w3.org/2001/XMLSchema}string"/>
* &lt;/sequence> * &lt;/sequence>
* &lt;/restriction> * &lt;/restriction>
* &lt;/complexContent> * &lt;/complexContent>
* &lt;/complexType> * &lt;/complexType>
* </pre> * </pre>
* *
* * <p>The JAXB generated source has been modified by adding
*/ * a <CODE>set</CODE> method for the street property. Otherwise
* the proxying mechanism will not work - see OPENJPA-834.
@XmlRootElement */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Address", propOrder = { @XmlRootElement
"name", @XmlAccessorType(XmlAccessType.FIELD)
"street", @XmlType(name = "Address", propOrder = {
"city" "name",
}) "street",
public class Address { "city"
})
@XmlElement(name = "Name") public class Address {
protected String name;
@XmlElement(name = "Street") @XmlElement(name = "Name")
protected List<String> street; protected String name;
@XmlElement(name = "City") @XmlElement(name = "Street")
protected String city; protected List<String> street;
@XmlElement(name = "City")
/** protected String city;
* Gets the value of the name property.
* /**
* @return * Gets the value of the name property.
* possible object is *
* {@link String } * @return
* * possible object is
*/ * {@link String }
public String getName() { *
return name; */
} public String getName() {
return name;
/** }
* Sets the value of the name property.
* /**
* @param value * Sets the value of the name property.
* allowed object is *
* {@link String } * @param value
* * allowed object is
*/ * {@link String }
public void setName(String value) { *
this.name = value; */
} public void setName(String value) {
this.name = value;
/** }
* Gets the value of the street property.
* /**
* <p> * Gets the value of the street property.
* This accessor method returns a reference to the live list, *
* not a snapshot. Therefore any modification you make to the * <p>
* returned list will be present inside the JAXB object. * This accessor method returns a reference to the live list,
* This is why there is not a <CODE>set</CODE> method for the street property. * not a snapshot. Therefore any modification you make to the
* * returned list will be present inside the JAXB object.
* <p> *
* For example, to add a new item, do as follows: * <p>
* <pre> * For example, to add a new item, do as follows:
* getStreet().add(newItem); * <pre>
* </pre> * getStreet().add(newItem);
* * </pre>
* *
* <p> *
* Objects of the following type(s) are allowed in the list * <p>
* {@link String } * Objects of the following type(s) are allowed in the list
* * {@link String }
* *
*/ *
public List<String> getStreet() { */
if (street == null) { public List<String> getStreet() {
street = new ArrayList<String>(); if (street == null) {
} street = new ArrayList<String>();
return this.street; }
} return this.street;
}
/**
* Gets the value of the city property. /**
* * Sets the value of the street property.
* @return *
* possible object is * @param value a List of String instances
* {@link String } */
* public void setStreet(List<String> value) {
*/ this.street = value;
public String getCity() { }
return city;
} /**
* Gets the value of the city property.
/** *
* Sets the value of the city property. * @return
* * possible object is
* @param value * {@link String }
* allowed object is *
* {@link String } */
* public String getCity() {
*/ return city;
public void setCity(String value) { }
this.city = value;
} /**
* Sets the value of the city property.
public String toString() { *
StringBuffer sb = new StringBuffer(); * @param value
sb.append(this.name); * allowed object is
for (int i=0; i< this.getStreet().size(); i++) * {@link String }
sb.append("\n "+this.getStreet().get(i)); *
sb.append("\n "+this.getCity()); */
return sb.toString(); public void setCity(String value) {
} this.city = value;
} }
public String toString() {
StringBuffer sb = new StringBuffer();
sb.append(this.name);
for (int i=0; i< this.getStreet().size(); i++)
sb.append("\n "+this.getStreet().get(i));
sb.append("\n "+this.getCity());
return sb.toString();
}
}