Format Java code with respect to ONAP Code Style
[externalapi/nbi.git] / src / main / java / org / onap / nbi / apis / serviceorder / model / orchestrator / ExecutionTask.java
1 /**
2  * Copyright (c) 2018 Orange
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5  * the License. You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11  * specific language governing permissions and limitations under the License.
12  */
13
14 package org.onap.nbi.apis.serviceorder.model.orchestrator;
15
16 import java.util.Date;
17 import java.util.Objects;
18 import javax.persistence.Entity;
19 import javax.persistence.GeneratedValue;
20 import javax.persistence.GenerationType;
21 import javax.persistence.Id;
22 import javax.persistence.Lob;
23
24 @Entity
25 public class ExecutionTask {
26
27     @Id
28     @GeneratedValue(strategy = GenerationType.AUTO)
29     private Long internalId;
30
31     private String orderItemId;
32
33     private String reliedTasks;
34
35     private Date createDate;
36
37     private Date lastAttemptDate;
38
39     @Lob
40     private String serviceOrderInfoJson;
41
42     public String getServiceOrderInfoJson() {
43         return serviceOrderInfoJson;
44     }
45
46     public void setServiceOrderInfoJson(String serviceOrderInfoJson) {
47         this.serviceOrderInfoJson = serviceOrderInfoJson;
48     }
49
50     public Date getLastAttemptDate() {
51         return lastAttemptDate;
52     }
53
54     public void setLastAttemptDate(Date lastAttemptDate) {
55         this.lastAttemptDate = lastAttemptDate;
56     }
57
58     public String getOrderItemId() {
59         return orderItemId;
60     }
61
62     public void setOrderItemId(String orderItemId) {
63         this.orderItemId = orderItemId;
64     }
65
66     public String getReliedTasks() {
67         return reliedTasks;
68     }
69
70     public void setReliedTasks(String reliedTasks) {
71         this.reliedTasks = reliedTasks;
72     }
73
74     public Long getInternalId() {
75         return internalId;
76     }
77
78     public void setInternalId(Long internalId) {
79         this.internalId = internalId;
80     }
81
82     public Date getCreateDate() {
83         return createDate;
84     }
85
86     public void setCreateDate(Date createDate) {
87         this.createDate = createDate;
88     }
89
90     @Override
91     public boolean equals(Object o) {
92         if (this == o) {
93             return true;
94         }
95         if (o == null || getClass() != o.getClass()) {
96             return false;
97         }
98         ExecutionTask that = (ExecutionTask) o;
99         return Objects.equals(internalId, that.internalId) && Objects.equals(orderItemId, that.orderItemId)
100                 && Objects.equals(reliedTasks, that.reliedTasks) && Objects.equals(createDate, that.createDate)
101                 && Objects.equals(lastAttemptDate, that.lastAttemptDate)
102                 && Objects.equals(serviceOrderInfoJson, that.serviceOrderInfoJson);
103     }
104
105     @Override
106     public int hashCode() {
107         return Objects.hash(internalId, orderItemId, reliedTasks, createDate, lastAttemptDate, serviceOrderInfoJson);
108     }
109
110     @Override
111     public String toString() {
112         return "ExecutionTask{" + "internalId=" + internalId + ", orderItemId='" + orderItemId + '\''
113                 + ", reliedTasks='" + reliedTasks + '\'' + ", createDate=" + createDate + ", lastAttemptDate="
114                 + lastAttemptDate + ", serviceOrderInfoJson='" + serviceOrderInfoJson + '\'' + '}';
115     }
116 }