Advertisement
Guest User

Untitled

a guest
May 10th, 2018
343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 19.09 KB | None | 0 0
  1. //
  2. // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
  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: 2018.05.10 at 11:36:38 AM CEST
  6. //
  7.  
  8.  
  9. package generated;
  10.  
  11. import java.math.BigDecimal;
  12. import java.util.ArrayList;
  13. import java.util.Date;
  14. import java.util.List;
  15. import javax.persistence.Basic;
  16. import javax.persistence.CascadeType;
  17. import javax.persistence.Column;
  18. import javax.persistence.Entity;
  19. import javax.persistence.GeneratedValue;
  20. import javax.persistence.GenerationType;
  21. import javax.persistence.Id;
  22. import javax.persistence.Inheritance;
  23. import javax.persistence.InheritanceType;
  24. import javax.persistence.JoinColumn;
  25. import javax.persistence.OneToMany;
  26. import javax.persistence.Table;
  27. import javax.persistence.Temporal;
  28. import javax.persistence.TemporalType;
  29. import javax.persistence.Transient;
  30. import javax.xml.bind.annotation.XmlAccessType;
  31. import javax.xml.bind.annotation.XmlAccessorType;
  32. import javax.xml.bind.annotation.XmlAttribute;
  33. import javax.xml.bind.annotation.XmlElement;
  34. import javax.xml.bind.annotation.XmlSchemaType;
  35. import javax.xml.bind.annotation.XmlType;
  36. import javax.xml.datatype.XMLGregorianCalendar;
  37. import org.jvnet.hyperjaxb3.xml.bind.annotation.adapters.XMLGregorianCalendarAsDate;
  38. import org.jvnet.hyperjaxb3.xml.bind.annotation.adapters.XmlAdapterUtils;
  39. import org.jvnet.jaxb2_commons.lang.Equals;
  40. import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
  41. import org.jvnet.jaxb2_commons.lang.HashCode;
  42. import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
  43. import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
  44. import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
  45. import org.jvnet.jaxb2_commons.locator.ObjectLocator;
  46. import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
  47.  
  48.  
  49. /**
  50.  * <p>Java class for Items complex type.
  51.  *
  52.  * <p>The following schema fragment specifies the expected content contained within this class.
  53.  *
  54.  * <pre>
  55.  * &lt;complexType name="Items"&gt;
  56.  *   &lt;complexContent&gt;
  57.  *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
  58.  *       &lt;sequence&gt;
  59.  *         &lt;element name="item" maxOccurs="unbounded" minOccurs="0"&gt;
  60.  *           &lt;complexType&gt;
  61.  *             &lt;complexContent&gt;
  62.  *               &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
  63.  *                 &lt;sequence&gt;
  64.  *                   &lt;element name="productName" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
  65.  *                   &lt;element name="quantity"&gt;
  66.  *                     &lt;simpleType&gt;
  67.  *                       &lt;restriction base="{http://www.w3.org/2001/XMLSchema}positiveInteger"&gt;
  68.  *                         &lt;maxExclusive value="100"/&gt;
  69.  *                       &lt;/restriction&gt;
  70.  *                     &lt;/simpleType&gt;
  71.  *                   &lt;/element&gt;
  72.  *                   &lt;element name="USPrice" type="{http://www.w3.org/2001/XMLSchema}decimal"/&gt;
  73.  *                   &lt;element ref="{}comment" minOccurs="0"/&gt;
  74.  *                   &lt;element name="shipDate" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/&gt;
  75.  *                 &lt;/sequence&gt;
  76.  *                 &lt;attribute name="partNum" use="required" type="{}SKU" /&gt;
  77.  *               &lt;/restriction&gt;
  78.  *             &lt;/complexContent&gt;
  79.  *           &lt;/complexType&gt;
  80.  *         &lt;/element&gt;
  81.  *       &lt;/sequence&gt;
  82.  *     &lt;/restriction&gt;
  83.  *   &lt;/complexContent&gt;
  84.  * &lt;/complexType&gt;
  85.  * </pre>
  86.  *
  87.  *
  88.  */
  89. @XmlAccessorType(XmlAccessType.FIELD)
  90. @XmlType(name = "Items", propOrder = {
  91.     "item"
  92. })
  93. @Entity(name = "Items")
  94. @Table(name = "ITEMS")
  95. @Inheritance(strategy = InheritanceType.JOINED)
  96. public class Items
  97.     implements Equals, HashCode
  98. {
  99.  
  100.     protected List<Items.Item> item;
  101.     @XmlAttribute(name = "Hjid")
  102.     protected Long hjid;
  103.  
  104.     /**
  105.      * Gets the value of the item property.
  106.      *
  107.      * <p>
  108.      * This accessor method returns a reference to the live list,
  109.      * not a snapshot. Therefore any modification you make to the
  110.      * returned list will be present inside the JAXB object.
  111.      * This is why there is not a <CODE>set</CODE> method for the item property.
  112.      *
  113.      * <p>
  114.      * For example, to add a new item, do as follows:
  115.      * <pre>
  116.      *    getItem().add(newItem);
  117.      * </pre>
  118.      *
  119.      *
  120.      * <p>
  121.      * Objects of the following type(s) are allowed in the list
  122.      * {@link Items.Item }
  123.      *
  124.      *
  125.      */
  126.     @OneToMany(targetEntity = Items.Item.class, cascade = {
  127.         CascadeType.ALL
  128.     })
  129.     @JoinColumn(name = "ITEM_ITEMS_HJID")
  130.     public List<Items.Item> getItem() {
  131.         if (item == null) {
  132.             item = new ArrayList<Items.Item>();
  133.         }
  134.         return this.item;
  135.     }
  136.  
  137.     /**
  138.      *
  139.      *
  140.      */
  141.     public void setItem(List<Items.Item> item) {
  142.         this.item = item;
  143.     }
  144.  
  145.     /**
  146.      * Gets the value of the hjid property.
  147.      *
  148.      * @return
  149.      *     possible object is
  150.      *     {@link Long }
  151.      *    
  152.      */
  153.     @Id
  154.     @Column(name = "HJID")
  155.     @GeneratedValue(strategy = GenerationType.AUTO)
  156.     public Long getHjid() {
  157.         return hjid;
  158.     }
  159.  
  160.     /**
  161.      * Sets the value of the hjid property.
  162.      *
  163.      * @param value
  164.      *     allowed object is
  165.      *     {@link Long }
  166.      *    
  167.      */
  168.     public void setHjid(Long value) {
  169.         this.hjid = value;
  170.     }
  171.  
  172.     public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
  173.         if ((object == null)||(this.getClass()!= object.getClass())) {
  174.             return false;
  175.         }
  176.         if (this == object) {
  177.             return true;
  178.         }
  179.         final Items that = ((Items) object);
  180.         {
  181.             List<Items.Item> lhsItem;
  182.             lhsItem = (((this.item!= null)&&(!this.item.isEmpty()))?this.getItem():null);
  183.             List<Items.Item> rhsItem;
  184.             rhsItem = (((that.item!= null)&&(!that.item.isEmpty()))?that.getItem():null);
  185.             if (!strategy.equals(LocatorUtils.property(thisLocator, "item", lhsItem), LocatorUtils.property(thatLocator, "item", rhsItem), lhsItem, rhsItem)) {
  186.                 return false;
  187.             }
  188.         }
  189.         return true;
  190.     }
  191.  
  192.     public boolean equals(Object object) {
  193.         final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
  194.         return equals(null, null, object, strategy);
  195.     }
  196.  
  197.     public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
  198.         int currentHashCode = 1;
  199.         {
  200.             List<Items.Item> theItem;
  201.             theItem = (((this.item!= null)&&(!this.item.isEmpty()))?this.getItem():null);
  202.             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "item", theItem), currentHashCode, theItem);
  203.         }
  204.         return currentHashCode;
  205.     }
  206.  
  207.     public int hashCode() {
  208.         final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
  209.         return this.hashCode(null, strategy);
  210.     }
  211.  
  212.  
  213.     /**
  214.      * <p>Java class for anonymous complex type.
  215.      *
  216.      * <p>The following schema fragment specifies the expected content contained within this class.
  217.      *
  218.      * <pre>
  219.      * &lt;complexType&gt;
  220.      *   &lt;complexContent&gt;
  221.      *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
  222.      *       &lt;sequence&gt;
  223.      *         &lt;element name="productName" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
  224.      *         &lt;element name="quantity"&gt;
  225.      *           &lt;simpleType&gt;
  226.      *             &lt;restriction base="{http://www.w3.org/2001/XMLSchema}positiveInteger"&gt;
  227.      *               &lt;maxExclusive value="100"/&gt;
  228.      *             &lt;/restriction&gt;
  229.      *           &lt;/simpleType&gt;
  230.      *         &lt;/element&gt;
  231.      *         &lt;element name="USPrice" type="{http://www.w3.org/2001/XMLSchema}decimal"/&gt;
  232.      *         &lt;element ref="{}comment" minOccurs="0"/&gt;
  233.      *         &lt;element name="shipDate" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/&gt;
  234.      *       &lt;/sequence&gt;
  235.      *       &lt;attribute name="partNum" use="required" type="{}SKU" /&gt;
  236.      *     &lt;/restriction&gt;
  237.      *   &lt;/complexContent&gt;
  238.      * &lt;/complexType&gt;
  239.      * </pre>
  240.      *
  241.      *
  242.      */
  243.     @XmlAccessorType(XmlAccessType.FIELD)
  244.     @XmlType(name = "", propOrder = {
  245.         "productName",
  246.         "quantity",
  247.         "usPrice",
  248.         "comment",
  249.         "shipDate"
  250.     })
  251.     @Entity(name = "Items$Item")
  252.     @Table(name = "ITEM")
  253.     @Inheritance(strategy = InheritanceType.JOINED)
  254.     public static class Item
  255.         implements Equals, HashCode
  256.     {
  257.  
  258.         @XmlElement(required = true)
  259.         protected String productName;
  260.         protected int quantity;
  261.         @XmlElement(name = "USPrice", required = true)
  262.         protected BigDecimal usPrice;
  263.         protected String comment;
  264.         @XmlSchemaType(name = "date")
  265.         protected XMLGregorianCalendar shipDate;
  266.         @XmlAttribute(name = "partNum", required = true)
  267.         protected String partNum;
  268.         @XmlAttribute(name = "Hjid")
  269.         protected Long hjid;
  270.  
  271.         /**
  272.          * Gets the value of the productName property.
  273.          *
  274.          * @return
  275.          *     possible object is
  276.          *     {@link String }
  277.          *    
  278.          */
  279.         @Basic
  280.         @Column(name = "PRODUCT_NAME", length = 255)
  281.         public String getProductName() {
  282.             return productName;
  283.         }
  284.  
  285.         /**
  286.          * Sets the value of the productName property.
  287.          *
  288.          * @param value
  289.          *     allowed object is
  290.          *     {@link String }
  291.          *    
  292.          */
  293.         public void setProductName(String value) {
  294.             this.productName = value;
  295.         }
  296.  
  297.         /**
  298.          * Gets the value of the quantity property.
  299.          *
  300.          */
  301.         @Basic
  302.         @Column(name = "QUANTITY")
  303.         public int getQuantity() {
  304.             return quantity;
  305.         }
  306.  
  307.         /**
  308.          * Sets the value of the quantity property.
  309.          *
  310.          */
  311.         public void setQuantity(int value) {
  312.             this.quantity = value;
  313.         }
  314.  
  315.         /**
  316.          * Gets the value of the usPrice property.
  317.          *
  318.          * @return
  319.          *     possible object is
  320.          *     {@link BigDecimal }
  321.          *    
  322.          */
  323.         @Basic
  324.         @Column(name = "USPRICE", precision = 20, scale = 10)
  325.         public BigDecimal getUSPrice() {
  326.             return usPrice;
  327.         }
  328.  
  329.         /**
  330.          * Sets the value of the usPrice property.
  331.          *
  332.          * @param value
  333.          *     allowed object is
  334.          *     {@link BigDecimal }
  335.          *    
  336.          */
  337.         public void setUSPrice(BigDecimal value) {
  338.             this.usPrice = value;
  339.         }
  340.  
  341.         /**
  342.          * Gets the value of the comment property.
  343.          *
  344.          * @return
  345.          *     possible object is
  346.          *     {@link String }
  347.          *    
  348.          */
  349.         @Basic
  350.         @Column(name = "COMMENT_", length = 255)
  351.         public String getComment() {
  352.             return comment;
  353.         }
  354.  
  355.         /**
  356.          * Sets the value of the comment property.
  357.          *
  358.          * @param value
  359.          *     allowed object is
  360.          *     {@link String }
  361.          *    
  362.          */
  363.         public void setComment(String value) {
  364.             this.comment = value;
  365.         }
  366.  
  367.         /**
  368.          * Gets the value of the shipDate property.
  369.          *
  370.          * @return
  371.          *     possible object is
  372.          *     {@link XMLGregorianCalendar }
  373.          *    
  374.          */
  375.         @Transient
  376.         public XMLGregorianCalendar getShipDate() {
  377.             return shipDate;
  378.         }
  379.  
  380.         /**
  381.          * Sets the value of the shipDate property.
  382.          *
  383.          * @param value
  384.          *     allowed object is
  385.          *     {@link XMLGregorianCalendar }
  386.          *    
  387.          */
  388.         public void setShipDate(XMLGregorianCalendar value) {
  389.             this.shipDate = value;
  390.         }
  391.  
  392.         /**
  393.          * Gets the value of the partNum property.
  394.          *
  395.          * @return
  396.          *     possible object is
  397.          *     {@link String }
  398.          *    
  399.          */
  400.         @Basic
  401.         @Column(name = "PART_NUM", length = 255)
  402.         public String getPartNum() {
  403.             return partNum;
  404.         }
  405.  
  406.         /**
  407.          * Sets the value of the partNum property.
  408.          *
  409.          * @param value
  410.          *     allowed object is
  411.          *     {@link String }
  412.          *    
  413.          */
  414.         public void setPartNum(String value) {
  415.             this.partNum = value;
  416.         }
  417.  
  418.         /**
  419.          * Gets the value of the hjid property.
  420.          *
  421.          * @return
  422.          *     possible object is
  423.          *     {@link Long }
  424.          *    
  425.          */
  426.         @Id
  427.         @Column(name = "HJID")
  428.         @GeneratedValue(strategy = GenerationType.AUTO)
  429.         public Long getHjid() {
  430.             return hjid;
  431.         }
  432.  
  433.         /**
  434.          * Sets the value of the hjid property.
  435.          *
  436.          * @param value
  437.          *     allowed object is
  438.          *     {@link Long }
  439.          *    
  440.          */
  441.         public void setHjid(Long value) {
  442.             this.hjid = value;
  443.         }
  444.  
  445.         @Basic
  446.         @Column(name = "SHIP_DATE_ITEM")
  447.         @Temporal(TemporalType.DATE)
  448.         public Date getShipDateItem() {
  449.             return XmlAdapterUtils.unmarshall(XMLGregorianCalendarAsDate.class, this.getShipDate());
  450.         }
  451.  
  452.         public void setShipDateItem(Date target) {
  453.             setShipDate(XmlAdapterUtils.marshall(XMLGregorianCalendarAsDate.class, target));
  454.         }
  455.  
  456.         public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
  457.             if ((object == null)||(this.getClass()!= object.getClass())) {
  458.                 return false;
  459.             }
  460.             if (this == object) {
  461.                 return true;
  462.             }
  463.             final Items.Item that = ((Items.Item) object);
  464.             {
  465.                 String lhsProductName;
  466.                 lhsProductName = this.getProductName();
  467.                 String rhsProductName;
  468.                 rhsProductName = that.getProductName();
  469.                 if (!strategy.equals(LocatorUtils.property(thisLocator, "productName", lhsProductName), LocatorUtils.property(thatLocator, "productName", rhsProductName), lhsProductName, rhsProductName)) {
  470.                     return false;
  471.                 }
  472.             }
  473.             {
  474.                 int lhsQuantity;
  475.                 lhsQuantity = this.getQuantity();
  476.                 int rhsQuantity;
  477.                 rhsQuantity = that.getQuantity();
  478.                 if (!strategy.equals(LocatorUtils.property(thisLocator, "quantity", lhsQuantity), LocatorUtils.property(thatLocator, "quantity", rhsQuantity), lhsQuantity, rhsQuantity)) {
  479.                     return false;
  480.                 }
  481.             }
  482.             {
  483.                 BigDecimal lhsUSPrice;
  484.                 lhsUSPrice = this.getUSPrice();
  485.                 BigDecimal rhsUSPrice;
  486.                 rhsUSPrice = that.getUSPrice();
  487.                 if (!strategy.equals(LocatorUtils.property(thisLocator, "usPrice", lhsUSPrice), LocatorUtils.property(thatLocator, "usPrice", rhsUSPrice), lhsUSPrice, rhsUSPrice)) {
  488.                     return false;
  489.                 }
  490.             }
  491.             {
  492.                 String lhsComment;
  493.                 lhsComment = this.getComment();
  494.                 String rhsComment;
  495.                 rhsComment = that.getComment();
  496.                 if (!strategy.equals(LocatorUtils.property(thisLocator, "comment", lhsComment), LocatorUtils.property(thatLocator, "comment", rhsComment), lhsComment, rhsComment)) {
  497.                     return false;
  498.                 }
  499.             }
  500.             {
  501.                 XMLGregorianCalendar lhsShipDate;
  502.                 lhsShipDate = this.getShipDate();
  503.                 XMLGregorianCalendar rhsShipDate;
  504.                 rhsShipDate = that.getShipDate();
  505.                 if (!strategy.equals(LocatorUtils.property(thisLocator, "shipDate", lhsShipDate), LocatorUtils.property(thatLocator, "shipDate", rhsShipDate), lhsShipDate, rhsShipDate)) {
  506.                     return false;
  507.                 }
  508.             }
  509.             {
  510.                 String lhsPartNum;
  511.                 lhsPartNum = this.getPartNum();
  512.                 String rhsPartNum;
  513.                 rhsPartNum = that.getPartNum();
  514.                 if (!strategy.equals(LocatorUtils.property(thisLocator, "partNum", lhsPartNum), LocatorUtils.property(thatLocator, "partNum", rhsPartNum), lhsPartNum, rhsPartNum)) {
  515.                     return false;
  516.                 }
  517.             }
  518.             return true;
  519.         }
  520.  
  521.         public boolean equals(Object object) {
  522.             final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
  523.             return equals(null, null, object, strategy);
  524.         }
  525.  
  526.         public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
  527.             int currentHashCode = 1;
  528.             {
  529.                 String theProductName;
  530.                 theProductName = this.getProductName();
  531.                 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "productName", theProductName), currentHashCode, theProductName);
  532.             }
  533.             {
  534.                 int theQuantity;
  535.                 theQuantity = this.getQuantity();
  536.                 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "quantity", theQuantity), currentHashCode, theQuantity);
  537.             }
  538.             {
  539.                 BigDecimal theUSPrice;
  540.                 theUSPrice = this.getUSPrice();
  541.                 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "usPrice", theUSPrice), currentHashCode, theUSPrice);
  542.             }
  543.             {
  544.                 String theComment;
  545.                 theComment = this.getComment();
  546.                 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "comment", theComment), currentHashCode, theComment);
  547.             }
  548.             {
  549.                 XMLGregorianCalendar theShipDate;
  550.                 theShipDate = this.getShipDate();
  551.                 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "shipDate", theShipDate), currentHashCode, theShipDate);
  552.             }
  553.             {
  554.                 String thePartNum;
  555.                 thePartNum = this.getPartNum();
  556.                 currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "partNum", thePartNum), currentHashCode, thePartNum);
  557.             }
  558.             return currentHashCode;
  559.         }
  560.  
  561.         public int hashCode() {
  562.             final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
  563.             return this.hashCode(null, strategy);
  564.         }
  565.  
  566.     }
  567.  
  568. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement