Author: fancy
Date: Thu Jan 15 13:29:31 2009
New Revision: 734828

URL: http://svn.apache.org/viewvc?rev=734828&view=rev
Log:
OPENJPA-834 fix xmlmapping testcase
committing patch provided by Milosz Tylenda

Modified:
    
openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xmlmapping/xmlbindings/myaddress/Address.java
    
openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xmlmapping/xmlbindings/myaddress/Address.java

Modified: 
openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xmlmapping/xmlbindings/myaddress/Address.java
URL: 
http://svn.apache.org/viewvc/openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xmlmapping/xmlbindings/myaddress/Address.java?rev=734828&r1=734827&r2=734828&view=diff
==============================================================================
--- 
openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xmlmapping/xmlbindings/myaddress/Address.java
 (original)
+++ 
openjpa/branches/1.3.x/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xmlmapping/xmlbindings/myaddress/Address.java
 Thu Jan 15 13:29:31 2009
@@ -1,142 +1,152 @@
-//
-// 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> 
-// 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 
-//
-
-
-package org.apache.openjpa.persistence.xmlmapping.xmlbindings.myaddress;
-
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * <p>Java class for Address complex type.
- * 
- * <p>The following schema fragment specifies the expected content contained 
within this class.
- * 
- * <pre>
- * &lt;complexType name="Address">
- *   &lt;complexContent>
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType";>
- *       &lt;sequence>
- *         &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="City" 
type="{http://www.w3.org/2001/XMLSchema}string"/>
- *       &lt;/sequence>
- *     &lt;/restriction>
- *   &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- * 
- * 
- */
-
-...@xmlrootelement
-...@xmlaccessortype(XmlAccessType.FIELD)
-...@xmltype(name = "Address", propOrder = {
-    "name",
-    "street",
-    "city"
-})
-public class Address {
-
-    @XmlElement(name = "Name")
-    protected String name;
-    @XmlElement(name = "Street")
-    protected List<String> street;
-    @XmlElement(name = "City")
-    protected String city;
-
-    /**
-     * Gets the value of the name property.
-     * 
-     * @return
-     *     possible object is
-     *     {...@link String }
-     *     
-     */
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * Sets the value of the name property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {...@link String }
-     *     
-     */
-    public void setName(String value) {
-        this.name = value;
-    }
-
-    /**
-     * Gets the value of the street property.
-     * 
-     * <p>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the street 
property.
-     * 
-     * <p>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getStreet().add(newItem);
-     * </pre>
-     * 
-     * 
-     * <p>
-     * Objects of the following type(s) are allowed in the list
-     * {...@link String }
-     * 
-     * 
-     */
-    public List<String> getStreet() {
-        if (street == null) {
-            street = new ArrayList<String>();
-        }
-        return this.street;
-    }
-
-    /**
-     * Gets the value of the city property.
-     * 
-     * @return
-     *     possible object is
-     *     {...@link String }
-     *     
-     */
-    public String getCity() {
-        return city;
-    }
-
-    /**
-     * Sets the value of the city property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {...@link String }
-     *     
-     */
-    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();
-    }
-}
+//
+// 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> 
+// 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 
+//
+
+
+package org.apache.openjpa.persistence.xmlmapping.xmlbindings.myaddress;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>Java class for Address complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained 
within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="Address">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType";>
+ *       &lt;sequence>
+ *         &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="City" 
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </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 = {
+    "name",
+    "street",
+    "city"
+})
+public class Address {
+
+    @XmlElement(name = "Name")
+    protected String name;
+    @XmlElement(name = "Street")
+    protected List<String> street;
+    @XmlElement(name = "City")
+    protected String city;
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * @return
+     *     possible object is
+     *     {...@link String }
+     *     
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {...@link String }
+     *     
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+    /**
+     * Gets the value of the street property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * 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:
+     * <pre>
+     *    getStreet().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {...@link String }
+     * 
+     * 
+     */
+    public List<String> getStreet() {
+        if (street == null) {
+            street = new ArrayList<String>();
+        }
+        return this.street;
+    }
+
+    /**
+     * Sets the value of the street property.
+     * 
+     * @param value a List of String instances
+     */
+    public void setStreet(List<String> value) {
+        this.street = value;
+    }
+
+    /**
+     * Gets the value of the city property.
+     * 
+     * @return
+     *     possible object is
+     *     {...@link String }
+     *     
+     */
+    public String getCity() {
+        return city;
+    }
+
+    /**
+     * Sets the value of the city property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {...@link String }
+     *     
+     */
+    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();
+    }
+}

Modified: 
openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xmlmapping/xmlbindings/myaddress/Address.java
URL: 
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xmlmapping/xmlbindings/myaddress/Address.java?rev=734828&r1=734827&r2=734828&view=diff
==============================================================================
--- 
openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xmlmapping/xmlbindings/myaddress/Address.java
 (original)
+++ 
openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/xmlmapping/xmlbindings/myaddress/Address.java
 Thu Jan 15 13:29:31 2009
@@ -1,142 +1,152 @@
-//
-// 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> 
-// 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 
-//
-
-
-package org.apache.openjpa.persistence.xmlmapping.xmlbindings.myaddress;
-
-import java.util.ArrayList;
-import java.util.List;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * <p>Java class for Address complex type.
- * 
- * <p>The following schema fragment specifies the expected content contained 
within this class.
- * 
- * <pre>
- * &lt;complexType name="Address">
- *   &lt;complexContent>
- *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType";>
- *       &lt;sequence>
- *         &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="City" 
type="{http://www.w3.org/2001/XMLSchema}string"/>
- *       &lt;/sequence>
- *     &lt;/restriction>
- *   &lt;/complexContent>
- * &lt;/complexType>
- * </pre>
- * 
- * 
- */
-
-...@xmlrootelement
-...@xmlaccessortype(XmlAccessType.FIELD)
-...@xmltype(name = "Address", propOrder = {
-    "name",
-    "street",
-    "city"
-})
-public class Address {
-
-    @XmlElement(name = "Name")
-    protected String name;
-    @XmlElement(name = "Street")
-    protected List<String> street;
-    @XmlElement(name = "City")
-    protected String city;
-
-    /**
-     * Gets the value of the name property.
-     * 
-     * @return
-     *     possible object is
-     *     {...@link String }
-     *     
-     */
-    public String getName() {
-        return name;
-    }
-
-    /**
-     * Sets the value of the name property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {...@link String }
-     *     
-     */
-    public void setName(String value) {
-        this.name = value;
-    }
-
-    /**
-     * Gets the value of the street property.
-     * 
-     * <p>
-     * This accessor method returns a reference to the live list,
-     * not a snapshot. Therefore any modification you make to the
-     * returned list will be present inside the JAXB object.
-     * This is why there is not a <CODE>set</CODE> method for the street 
property.
-     * 
-     * <p>
-     * For example, to add a new item, do as follows:
-     * <pre>
-     *    getStreet().add(newItem);
-     * </pre>
-     * 
-     * 
-     * <p>
-     * Objects of the following type(s) are allowed in the list
-     * {...@link String }
-     * 
-     * 
-     */
-    public List<String> getStreet() {
-        if (street == null) {
-            street = new ArrayList<String>();
-        }
-        return this.street;
-    }
-
-    /**
-     * Gets the value of the city property.
-     * 
-     * @return
-     *     possible object is
-     *     {...@link String }
-     *     
-     */
-    public String getCity() {
-        return city;
-    }
-
-    /**
-     * Sets the value of the city property.
-     * 
-     * @param value
-     *     allowed object is
-     *     {...@link String }
-     *     
-     */
-    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();
-    }
-}
+//
+// 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> 
+// 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 
+//
+
+
+package org.apache.openjpa.persistence.xmlmapping.xmlbindings.myaddress;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * <p>Java class for Address complex type.
+ * 
+ * <p>The following schema fragment specifies the expected content contained 
within this class.
+ * 
+ * <pre>
+ * &lt;complexType name="Address">
+ *   &lt;complexContent>
+ *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType";>
+ *       &lt;sequence>
+ *         &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="City" 
type="{http://www.w3.org/2001/XMLSchema}string"/>
+ *       &lt;/sequence>
+ *     &lt;/restriction>
+ *   &lt;/complexContent>
+ * &lt;/complexType>
+ * </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 = {
+    "name",
+    "street",
+    "city"
+})
+public class Address {
+
+    @XmlElement(name = "Name")
+    protected String name;
+    @XmlElement(name = "Street")
+    protected List<String> street;
+    @XmlElement(name = "City")
+    protected String city;
+
+    /**
+     * Gets the value of the name property.
+     * 
+     * @return
+     *     possible object is
+     *     {...@link String }
+     *     
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the value of the name property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {...@link String }
+     *     
+     */
+    public void setName(String value) {
+        this.name = value;
+    }
+
+    /**
+     * Gets the value of the street property.
+     * 
+     * <p>
+     * This accessor method returns a reference to the live list,
+     * 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:
+     * <pre>
+     *    getStreet().add(newItem);
+     * </pre>
+     * 
+     * 
+     * <p>
+     * Objects of the following type(s) are allowed in the list
+     * {...@link String }
+     * 
+     * 
+     */
+    public List<String> getStreet() {
+        if (street == null) {
+            street = new ArrayList<String>();
+        }
+        return this.street;
+    }
+
+    /**
+     * Sets the value of the street property.
+     * 
+     * @param value a List of String instances
+     */
+    public void setStreet(List<String> value) {
+        this.street = value;
+    }
+
+    /**
+     * Gets the value of the city property.
+     * 
+     * @return
+     *     possible object is
+     *     {...@link String }
+     *     
+     */
+    public String getCity() {
+        return city;
+    }
+
+    /**
+     * Sets the value of the city property.
+     * 
+     * @param value
+     *     allowed object is
+     *     {...@link String }
+     *     
+     */
+    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();
+    }
+}


Reply via email to