View Javadoc
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: 2017.04.23 at 07:23:18 PM CEST 
6   //
7   
8   
9   package com.hack23.cia.model.internal.application.data.impl;
10  
11  import java.io.Serializable;
12  import javax.persistence.Basic;
13  import javax.persistence.Column;
14  import javax.persistence.Entity;
15  import javax.persistence.EnumType;
16  import javax.persistence.Enumerated;
17  import javax.persistence.GeneratedValue;
18  import javax.persistence.GenerationType;
19  import javax.persistence.Id;
20  import javax.persistence.Inheritance;
21  import javax.persistence.InheritanceType;
22  import javax.persistence.Table;
23  import javax.xml.bind.annotation.XmlAccessType;
24  import javax.xml.bind.annotation.XmlAccessorType;
25  import javax.xml.bind.annotation.XmlAttribute;
26  import javax.xml.bind.annotation.XmlSchemaType;
27  import javax.xml.bind.annotation.XmlType;
28  import com.hack23.cia.model.common.api.ModelObject;
29  import org.jvnet.jaxb2_commons.lang.Equals;
30  import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
31  import org.jvnet.jaxb2_commons.lang.HashCode;
32  import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
33  import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
34  import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
35  import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
36  import org.jvnet.jaxb2_commons.lang.ToString;
37  import org.jvnet.jaxb2_commons.lang.ToStringStrategy;
38  import org.jvnet.jaxb2_commons.locator.ObjectLocator;
39  import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
40  
41  
42  /**
43   * <p>Java class for DataAgentWorkOrder complex type.
44   * 
45   * <p>The following schema fragment specifies the expected content contained within this class.
46   * 
47   * <pre>
48   * &lt;complexType name="DataAgentWorkOrder"&gt;
49   *   &lt;complexContent&gt;
50   *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
51   *       &lt;sequence&gt;
52   *         &lt;element name="target" type="{http://data.application.internal.model.cia.hack23.com/impl}DataAgentTarget" minOccurs="0"/&gt;
53   *         &lt;element name="operation" type="{http://data.application.internal.model.cia.hack23.com/impl}DataAgentOperation" minOccurs="0"/&gt;
54   *       &lt;/sequence&gt;
55   *     &lt;/restriction&gt;
56   *   &lt;/complexContent&gt;
57   * &lt;/complexType&gt;
58   * </pre>
59   * 
60   * 
61   */
62  @XmlAccessorType(XmlAccessType.FIELD)
63  @XmlType(name = "DataAgentWorkOrder", propOrder = {
64      "target",
65      "operation"
66  })
67  @Entity(name = "DataAgentWorkOrder")
68  @Table(name = "DATA_AGENT_WORK_ORDER")
69  @Inheritance(strategy = InheritanceType.JOINED)
70  public class DataAgentWorkOrder
71      implements Serializable, ModelObject, Equals, HashCode, ToString
72  {
73  
74      private final static long serialVersionUID = 1L;
75      @XmlSchemaType(name = "string")
76      protected DataAgentTarget target;
77      @XmlSchemaType(name = "string")
78      protected DataAgentOperation operation;
79      @XmlAttribute(name = "Hjid")
80      protected Long hjid;
81  
82      /**
83       * Gets the value of the target property.
84       * 
85       * @return
86       *     possible object is
87       *     {@link DataAgentTarget }
88       *     
89       */
90      @Basic
91      @Column(name = "TARGET", length = 255)
92      @Enumerated(EnumType.STRING)
93      public DataAgentTarget getTarget() {
94          return target;
95      }
96  
97      /**
98       * Sets the value of the target property.
99       * 
100      * @param value
101      *     allowed object is
102      *     {@link DataAgentTarget }
103      *     
104      */
105     public void setTarget(DataAgentTarget value) {
106         this.target = value;
107     }
108 
109     /**
110      * Gets the value of the operation property.
111      * 
112      * @return
113      *     possible object is
114      *     {@link DataAgentOperation }
115      *     
116      */
117     @Basic
118     @Column(name = "OPERATION_", length = 255)
119     @Enumerated(EnumType.STRING)
120     public DataAgentOperation getOperation() {
121         return operation;
122     }
123 
124     /**
125      * Sets the value of the operation property.
126      * 
127      * @param value
128      *     allowed object is
129      *     {@link DataAgentOperation }
130      *     
131      */
132     public void setOperation(DataAgentOperation value) {
133         this.operation = value;
134     }
135 
136     public DataAgentWorkOrder withTarget(DataAgentTarget value) {
137         setTarget(value);
138         return this;
139     }
140 
141     public DataAgentWorkOrder withOperation(DataAgentOperation value) {
142         setOperation(value);
143         return this;
144     }
145 
146     public String toString() {
147         final ToStringStrategy strategy = JAXBToStringStrategy.INSTANCE;
148         final StringBuilder buffer = new StringBuilder();
149         append(null, buffer, strategy);
150         return buffer.toString();
151     }
152 
153     public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
154         strategy.appendStart(locator, this, buffer);
155         appendFields(locator, buffer, strategy);
156         strategy.appendEnd(locator, this, buffer);
157         return buffer;
158     }
159 
160     public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy strategy) {
161         {
162             DataAgentTarget theTarget;
163             theTarget = this.getTarget();
164             strategy.appendField(locator, this, "target", buffer, theTarget);
165         }
166         {
167             DataAgentOperation theOperation;
168             theOperation = this.getOperation();
169             strategy.appendField(locator, this, "operation", buffer, theOperation);
170         }
171         return buffer;
172     }
173 
174     /**
175      * Gets the value of the hjid property.
176      * 
177      * @return
178      *     possible object is
179      *     {@link Long }
180      *     
181      */
182     @Id
183     @Column(name = "HJID")
184     @GeneratedValue(strategy = GenerationType.AUTO)
185     public Long getHjid() {
186         return hjid;
187     }
188 
189     /**
190      * Sets the value of the hjid property.
191      * 
192      * @param value
193      *     allowed object is
194      *     {@link Long }
195      *     
196      */
197     public void setHjid(Long value) {
198         this.hjid = value;
199     }
200 
201     public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
202         if ((object == null)||(this.getClass()!= object.getClass())) {
203             return false;
204         }
205         if (this == object) {
206             return true;
207         }
208         final DataAgentWorkOrder that = ((DataAgentWorkOrder) object);
209         {
210             DataAgentTarget lhsTarget;
211             lhsTarget = this.getTarget();
212             DataAgentTarget rhsTarget;
213             rhsTarget = that.getTarget();
214             if (!strategy.equals(LocatorUtils.property(thisLocator, "target", lhsTarget), LocatorUtils.property(thatLocator, "target", rhsTarget), lhsTarget, rhsTarget)) {
215                 return false;
216             }
217         }
218         {
219             DataAgentOperation lhsOperation;
220             lhsOperation = this.getOperation();
221             DataAgentOperation rhsOperation;
222             rhsOperation = that.getOperation();
223             if (!strategy.equals(LocatorUtils.property(thisLocator, "operation", lhsOperation), LocatorUtils.property(thatLocator, "operation", rhsOperation), lhsOperation, rhsOperation)) {
224                 return false;
225             }
226         }
227         return true;
228     }
229 
230     public boolean equals(Object object) {
231         final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
232         return equals(null, null, object, strategy);
233     }
234 
235     public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
236         int currentHashCode = 1;
237         {
238             DataAgentTarget theTarget;
239             theTarget = this.getTarget();
240             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "target", theTarget), currentHashCode, theTarget);
241         }
242         {
243             DataAgentOperation theOperation;
244             theOperation = this.getOperation();
245             currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "operation", theOperation), currentHashCode, theOperation);
246         }
247         return currentHashCode;
248     }
249 
250     public int hashCode() {
251         final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
252         return this.hashCode(null, strategy);
253     }
254 
255 }