1
2
3
4
5
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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
84
85
86
87
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
99
100
101
102
103
104
105 public void setTarget(DataAgentTarget value) {
106 this.target = value;
107 }
108
109
110
111
112
113
114
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
126
127
128
129
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
176
177
178
179
180
181
182 @Id
183 @Column(name = "HJID")
184 @GeneratedValue(strategy = GenerationType.AUTO)
185 public Long getHjid() {
186 return hjid;
187 }
188
189
190
191
192
193
194
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 }