2 * Copyright (c) 2018 Orange
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
7 * http://www.apache.org/licenses/LICENSE-2.0
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.
13 package org.onap.nbi.apis.serviceorder.model.orchestrator;
15 import java.util.Date;
16 import java.util.Objects;
17 import javax.persistence.Entity;
18 import javax.persistence.GeneratedValue;
19 import javax.persistence.GenerationType;
20 import javax.persistence.Id;
21 import javax.persistence.Lob;
24 public class ExecutionTask {
28 @GeneratedValue(strategy = GenerationType.AUTO)
29 private Long internalId;
31 private String orderItemId;
33 private String reliedTasks;
35 private Date createDate;
37 private Date lastAttemptDate;
40 private String serviceOrderInfoJson;
42 public String getServiceOrderInfoJson() {
43 return serviceOrderInfoJson;
46 public void setServiceOrderInfoJson(String serviceOrderInfoJson) {
47 this.serviceOrderInfoJson = serviceOrderInfoJson;
50 public Date getLastAttemptDate() {
51 return lastAttemptDate;
54 public void setLastAttemptDate(Date lastAttemptDate) {
55 this.lastAttemptDate = lastAttemptDate;
58 public String getOrderItemId() {
62 public void setOrderItemId(String orderItemId) {
63 this.orderItemId = orderItemId;
66 public String getReliedTasks() {
70 public void setReliedTasks(String reliedTasks) {
71 this.reliedTasks = reliedTasks;
74 public Long getInternalId() {
78 public void setInternalId(Long internalId) {
79 this.internalId = internalId;
82 public Date getCreateDate() {
86 public void setCreateDate(Date createDate) {
87 this.createDate = createDate;
91 public boolean equals(Object o) {
95 if (o == null || getClass() != o.getClass()) {
98 ExecutionTask that = (ExecutionTask) o;
99 return Objects.equals(internalId, that.internalId) &&
100 Objects.equals(orderItemId, that.orderItemId) &&
101 Objects.equals(reliedTasks, that.reliedTasks) &&
102 Objects.equals(createDate, that.createDate) &&
103 Objects.equals(lastAttemptDate, that.lastAttemptDate) &&
104 Objects.equals(serviceOrderInfoJson, that.serviceOrderInfoJson);
108 public int hashCode() {
109 return Objects.hash(internalId, orderItemId, reliedTasks, createDate, lastAttemptDate, serviceOrderInfoJson);
113 public String toString() {
114 return "ExecutionTask{" +
115 "internalId=" + internalId +
116 ", orderItemId='" + orderItemId + '\'' +
117 ", reliedTasks='" + reliedTasks + '\'' +
118 ", createDate=" + createDate +
119 ", lastAttemptDate=" + lastAttemptDate +
120 ", serviceOrderInfoJson='" + serviceOrderInfoJson + '\'' +