3 * Copyright (c) 2017 Orange. All rights reserved.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 package org.onap.nbi.apis.serviceorder.model.orchestrator;
19 import java.util.Date;
20 import java.util.Objects;
21 import javax.persistence.Entity;
22 import javax.persistence.GeneratedValue;
23 import javax.persistence.GenerationType;
24 import javax.persistence.Id;
25 import javax.persistence.OneToOne;
28 public class ExecutionTask {
32 @GeneratedValue(strategy = GenerationType.AUTO)
33 private Long internalId;
35 private String orderItemId;
37 private String reliedTasks;
39 private int nbRetries;
41 private Date lastAttemptDate;
44 private ServiceOrderInfoJson serviceOrderInfoJson;
46 public ServiceOrderInfoJson getServiceOrderInfoJson() {
47 return serviceOrderInfoJson;
50 public void setServiceOrderInfoJson(ServiceOrderInfoJson serviceOrderInfoJson) {
51 this.serviceOrderInfoJson = serviceOrderInfoJson;
54 public Date getLastAttemptDate() {
55 return lastAttemptDate;
58 public void setLastAttemptDate(Date lastAttemptDate) {
59 this.lastAttemptDate = lastAttemptDate;
62 public String getOrderItemId() {
66 public void setOrderItemId(String orderItemId) {
67 this.orderItemId = orderItemId;
70 public String getReliedTasks() {
74 public void setReliedTasks(String reliedTasks) {
75 this.reliedTasks = reliedTasks;
78 public int getNbRetries() {
82 public void setNbRetries(int nbRetries) {
83 this.nbRetries = nbRetries;
86 public Long getInternalId() {
90 public void setInternalId(Long internalId) {
91 this.internalId = internalId;
96 public boolean equals(Object o) {
99 if (o == null || getClass() != o.getClass())
101 ExecutionTask that = (ExecutionTask) o;
102 return nbRetries == that.nbRetries && Objects.equals(internalId, that.internalId)
103 && Objects.equals(orderItemId, that.orderItemId) && Objects.equals(reliedTasks, that.reliedTasks)
104 && Objects.equals(lastAttemptDate, that.lastAttemptDate)
105 && Objects.equals(serviceOrderInfoJson, that.serviceOrderInfoJson);
109 public int hashCode() {
110 return Objects.hash(internalId, orderItemId, reliedTasks, nbRetries, lastAttemptDate, serviceOrderInfoJson);