Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
- // 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: 2018.05.10 at 11:36:38 AM CEST
- //
- package generated;
- import java.math.BigDecimal;
- import java.util.ArrayList;
- import java.util.Date;
- import java.util.List;
- import javax.persistence.Basic;
- import javax.persistence.CascadeType;
- import javax.persistence.Column;
- import javax.persistence.Entity;
- import javax.persistence.GeneratedValue;
- import javax.persistence.GenerationType;
- import javax.persistence.Id;
- import javax.persistence.Inheritance;
- import javax.persistence.InheritanceType;
- import javax.persistence.JoinColumn;
- import javax.persistence.OneToMany;
- import javax.persistence.Table;
- import javax.persistence.Temporal;
- import javax.persistence.TemporalType;
- import javax.persistence.Transient;
- import javax.xml.bind.annotation.XmlAccessType;
- import javax.xml.bind.annotation.XmlAccessorType;
- import javax.xml.bind.annotation.XmlAttribute;
- import javax.xml.bind.annotation.XmlElement;
- import javax.xml.bind.annotation.XmlSchemaType;
- import javax.xml.bind.annotation.XmlType;
- import javax.xml.datatype.XMLGregorianCalendar;
- import org.jvnet.hyperjaxb3.xml.bind.annotation.adapters.XMLGregorianCalendarAsDate;
- import org.jvnet.hyperjaxb3.xml.bind.annotation.adapters.XmlAdapterUtils;
- import org.jvnet.jaxb2_commons.lang.Equals;
- import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
- import org.jvnet.jaxb2_commons.lang.HashCode;
- import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
- import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
- import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
- import org.jvnet.jaxb2_commons.locator.ObjectLocator;
- import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
- /**
- * <p>Java class for Items complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType name="Items">
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="item" maxOccurs="unbounded" minOccurs="0">
- * <complexType>
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="productName" type="{http://www.w3.org/2001/XMLSchema}string"/>
- * <element name="quantity">
- * <simpleType>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}positiveInteger">
- * <maxExclusive value="100"/>
- * </restriction>
- * </simpleType>
- * </element>
- * <element name="USPrice" type="{http://www.w3.org/2001/XMLSchema}decimal"/>
- * <element ref="{}comment" minOccurs="0"/>
- * <element name="shipDate" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/>
- * </sequence>
- * <attribute name="partNum" use="required" type="{}SKU" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </element>
- * </sequence>
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
- @XmlAccessorType(XmlAccessType.FIELD)
- @XmlType(name = "Items", propOrder = {
- "item"
- })
- @Entity(name = "Items")
- @Table(name = "ITEMS")
- @Inheritance(strategy = InheritanceType.JOINED)
- public class Items
- implements Equals, HashCode
- {
- protected List<Items.Item> item;
- @XmlAttribute(name = "Hjid")
- protected Long hjid;
- /**
- * Gets the value of the item 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 item property.
- *
- * <p>
- * For example, to add a new item, do as follows:
- * <pre>
- * getItem().add(newItem);
- * </pre>
- *
- *
- * <p>
- * Objects of the following type(s) are allowed in the list
- * {@link Items.Item }
- *
- *
- */
- @OneToMany(targetEntity = Items.Item.class, cascade = {
- CascadeType.ALL
- })
- @JoinColumn(name = "ITEM_ITEMS_HJID")
- public List<Items.Item> getItem() {
- if (item == null) {
- item = new ArrayList<Items.Item>();
- }
- return this.item;
- }
- /**
- *
- *
- */
- public void setItem(List<Items.Item> item) {
- this.item = item;
- }
- /**
- * Gets the value of the hjid property.
- *
- * @return
- * possible object is
- * {@link Long }
- *
- */
- @Id
- @Column(name = "HJID")
- @GeneratedValue(strategy = GenerationType.AUTO)
- public Long getHjid() {
- return hjid;
- }
- /**
- * Sets the value of the hjid property.
- *
- * @param value
- * allowed object is
- * {@link Long }
- *
- */
- public void setHjid(Long value) {
- this.hjid = value;
- }
- public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
- if ((object == null)||(this.getClass()!= object.getClass())) {
- return false;
- }
- if (this == object) {
- return true;
- }
- final Items that = ((Items) object);
- {
- List<Items.Item> lhsItem;
- lhsItem = (((this.item!= null)&&(!this.item.isEmpty()))?this.getItem():null);
- List<Items.Item> rhsItem;
- rhsItem = (((that.item!= null)&&(!that.item.isEmpty()))?that.getItem():null);
- if (!strategy.equals(LocatorUtils.property(thisLocator, "item", lhsItem), LocatorUtils.property(thatLocator, "item", rhsItem), lhsItem, rhsItem)) {
- return false;
- }
- }
- return true;
- }
- public boolean equals(Object object) {
- final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
- return equals(null, null, object, strategy);
- }
- public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
- int currentHashCode = 1;
- {
- List<Items.Item> theItem;
- theItem = (((this.item!= null)&&(!this.item.isEmpty()))?this.getItem():null);
- currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "item", theItem), currentHashCode, theItem);
- }
- return currentHashCode;
- }
- public int hashCode() {
- final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
- return this.hashCode(null, strategy);
- }
- /**
- * <p>Java class for anonymous complex type.
- *
- * <p>The following schema fragment specifies the expected content contained within this class.
- *
- * <pre>
- * <complexType>
- * <complexContent>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- * <sequence>
- * <element name="productName" type="{http://www.w3.org/2001/XMLSchema}string"/>
- * <element name="quantity">
- * <simpleType>
- * <restriction base="{http://www.w3.org/2001/XMLSchema}positiveInteger">
- * <maxExclusive value="100"/>
- * </restriction>
- * </simpleType>
- * </element>
- * <element name="USPrice" type="{http://www.w3.org/2001/XMLSchema}decimal"/>
- * <element ref="{}comment" minOccurs="0"/>
- * <element name="shipDate" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/>
- * </sequence>
- * <attribute name="partNum" use="required" type="{}SKU" />
- * </restriction>
- * </complexContent>
- * </complexType>
- * </pre>
- *
- *
- */
- @XmlAccessorType(XmlAccessType.FIELD)
- @XmlType(name = "", propOrder = {
- "productName",
- "quantity",
- "usPrice",
- "comment",
- "shipDate"
- })
- @Entity(name = "Items$Item")
- @Table(name = "ITEM")
- @Inheritance(strategy = InheritanceType.JOINED)
- public static class Item
- implements Equals, HashCode
- {
- @XmlElement(required = true)
- protected String productName;
- protected int quantity;
- @XmlElement(name = "USPrice", required = true)
- protected BigDecimal usPrice;
- protected String comment;
- @XmlSchemaType(name = "date")
- protected XMLGregorianCalendar shipDate;
- @XmlAttribute(name = "partNum", required = true)
- protected String partNum;
- @XmlAttribute(name = "Hjid")
- protected Long hjid;
- /**
- * Gets the value of the productName property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- @Basic
- @Column(name = "PRODUCT_NAME", length = 255)
- public String getProductName() {
- return productName;
- }
- /**
- * Sets the value of the productName property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setProductName(String value) {
- this.productName = value;
- }
- /**
- * Gets the value of the quantity property.
- *
- */
- @Basic
- @Column(name = "QUANTITY")
- public int getQuantity() {
- return quantity;
- }
- /**
- * Sets the value of the quantity property.
- *
- */
- public void setQuantity(int value) {
- this.quantity = value;
- }
- /**
- * Gets the value of the usPrice property.
- *
- * @return
- * possible object is
- * {@link BigDecimal }
- *
- */
- @Basic
- @Column(name = "USPRICE", precision = 20, scale = 10)
- public BigDecimal getUSPrice() {
- return usPrice;
- }
- /**
- * Sets the value of the usPrice property.
- *
- * @param value
- * allowed object is
- * {@link BigDecimal }
- *
- */
- public void setUSPrice(BigDecimal value) {
- this.usPrice = value;
- }
- /**
- * Gets the value of the comment property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- @Basic
- @Column(name = "COMMENT_", length = 255)
- public String getComment() {
- return comment;
- }
- /**
- * Sets the value of the comment property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setComment(String value) {
- this.comment = value;
- }
- /**
- * Gets the value of the shipDate property.
- *
- * @return
- * possible object is
- * {@link XMLGregorianCalendar }
- *
- */
- @Transient
- public XMLGregorianCalendar getShipDate() {
- return shipDate;
- }
- /**
- * Sets the value of the shipDate property.
- *
- * @param value
- * allowed object is
- * {@link XMLGregorianCalendar }
- *
- */
- public void setShipDate(XMLGregorianCalendar value) {
- this.shipDate = value;
- }
- /**
- * Gets the value of the partNum property.
- *
- * @return
- * possible object is
- * {@link String }
- *
- */
- @Basic
- @Column(name = "PART_NUM", length = 255)
- public String getPartNum() {
- return partNum;
- }
- /**
- * Sets the value of the partNum property.
- *
- * @param value
- * allowed object is
- * {@link String }
- *
- */
- public void setPartNum(String value) {
- this.partNum = value;
- }
- /**
- * Gets the value of the hjid property.
- *
- * @return
- * possible object is
- * {@link Long }
- *
- */
- @Id
- @Column(name = "HJID")
- @GeneratedValue(strategy = GenerationType.AUTO)
- public Long getHjid() {
- return hjid;
- }
- /**
- * Sets the value of the hjid property.
- *
- * @param value
- * allowed object is
- * {@link Long }
- *
- */
- public void setHjid(Long value) {
- this.hjid = value;
- }
- @Basic
- @Column(name = "SHIP_DATE_ITEM")
- @Temporal(TemporalType.DATE)
- public Date getShipDateItem() {
- return XmlAdapterUtils.unmarshall(XMLGregorianCalendarAsDate.class, this.getShipDate());
- }
- public void setShipDateItem(Date target) {
- setShipDate(XmlAdapterUtils.marshall(XMLGregorianCalendarAsDate.class, target));
- }
- public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
- if ((object == null)||(this.getClass()!= object.getClass())) {
- return false;
- }
- if (this == object) {
- return true;
- }
- final Items.Item that = ((Items.Item) object);
- {
- String lhsProductName;
- lhsProductName = this.getProductName();
- String rhsProductName;
- rhsProductName = that.getProductName();
- if (!strategy.equals(LocatorUtils.property(thisLocator, "productName", lhsProductName), LocatorUtils.property(thatLocator, "productName", rhsProductName), lhsProductName, rhsProductName)) {
- return false;
- }
- }
- {
- int lhsQuantity;
- lhsQuantity = this.getQuantity();
- int rhsQuantity;
- rhsQuantity = that.getQuantity();
- if (!strategy.equals(LocatorUtils.property(thisLocator, "quantity", lhsQuantity), LocatorUtils.property(thatLocator, "quantity", rhsQuantity), lhsQuantity, rhsQuantity)) {
- return false;
- }
- }
- {
- BigDecimal lhsUSPrice;
- lhsUSPrice = this.getUSPrice();
- BigDecimal rhsUSPrice;
- rhsUSPrice = that.getUSPrice();
- if (!strategy.equals(LocatorUtils.property(thisLocator, "usPrice", lhsUSPrice), LocatorUtils.property(thatLocator, "usPrice", rhsUSPrice), lhsUSPrice, rhsUSPrice)) {
- return false;
- }
- }
- {
- String lhsComment;
- lhsComment = this.getComment();
- String rhsComment;
- rhsComment = that.getComment();
- if (!strategy.equals(LocatorUtils.property(thisLocator, "comment", lhsComment), LocatorUtils.property(thatLocator, "comment", rhsComment), lhsComment, rhsComment)) {
- return false;
- }
- }
- {
- XMLGregorianCalendar lhsShipDate;
- lhsShipDate = this.getShipDate();
- XMLGregorianCalendar rhsShipDate;
- rhsShipDate = that.getShipDate();
- if (!strategy.equals(LocatorUtils.property(thisLocator, "shipDate", lhsShipDate), LocatorUtils.property(thatLocator, "shipDate", rhsShipDate), lhsShipDate, rhsShipDate)) {
- return false;
- }
- }
- {
- String lhsPartNum;
- lhsPartNum = this.getPartNum();
- String rhsPartNum;
- rhsPartNum = that.getPartNum();
- if (!strategy.equals(LocatorUtils.property(thisLocator, "partNum", lhsPartNum), LocatorUtils.property(thatLocator, "partNum", rhsPartNum), lhsPartNum, rhsPartNum)) {
- return false;
- }
- }
- return true;
- }
- public boolean equals(Object object) {
- final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
- return equals(null, null, object, strategy);
- }
- public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
- int currentHashCode = 1;
- {
- String theProductName;
- theProductName = this.getProductName();
- currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "productName", theProductName), currentHashCode, theProductName);
- }
- {
- int theQuantity;
- theQuantity = this.getQuantity();
- currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "quantity", theQuantity), currentHashCode, theQuantity);
- }
- {
- BigDecimal theUSPrice;
- theUSPrice = this.getUSPrice();
- currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "usPrice", theUSPrice), currentHashCode, theUSPrice);
- }
- {
- String theComment;
- theComment = this.getComment();
- currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "comment", theComment), currentHashCode, theComment);
- }
- {
- XMLGregorianCalendar theShipDate;
- theShipDate = this.getShipDate();
- currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "shipDate", theShipDate), currentHashCode, theShipDate);
- }
- {
- String thePartNum;
- thePartNum = this.getPartNum();
- currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "partNum", thePartNum), currentHashCode, thePartNum);
- }
- return currentHashCode;
- }
- public int hashCode() {
- final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
- return this.hashCode(null, strategy);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement