2 * ============LICENSE_START=======================================================
3 * Copyright (C) 2018 Ericsson. All rights reserved.
4 * ================================================================================
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 * SPDX-License-Identifier: Apache-2.0
18 * ============LICENSE_END=========================================================
20 package org.onap.so.monitoring.camunda.model;
22 import static org.onap.so.monitoring.utils.ObjectEqualsUtils.isEqual;
24 import com.fasterxml.jackson.annotation.JsonIgnore;
25 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
28 * @author waqas.ikram@ericsson.com
31 @JsonIgnoreProperties(ignoreUnknown = true)
32 public class ActivityInstance {
34 private String activityId;
35 private String activityName;
36 private String activityType;
37 private String processInstanceId;
38 private String calledProcessInstanceId;
39 private String startTime;
40 private String endTime;
41 private String durationInMillis;
43 public ActivityInstance() {}
47 * @return the activityId
49 public String getActivityId() {
54 * @param activityId the activityId to set
56 public void setActivityId(final String activityId) {
57 this.activityId = activityId;
61 * @return the activityName
63 public String getActivityName() {
68 * @param activityName the activityName to set
70 public void setActivityName(final String activityName) {
71 this.activityName = activityName;
75 * @return the activityType
77 public String getActivityType() {
82 * @param activityType the activityType to set
84 public void setActivityType(final String activityType) {
85 this.activityType = activityType;
89 * @return the processInstanceId
91 public String getProcessInstanceId() {
92 return processInstanceId;
96 * @param processInstanceId the processInstanceId to set
98 public void setProcessInstanceId(final String processInstanceId) {
99 this.processInstanceId = processInstanceId;
103 * @return the calledProcessInstanceId
105 public String getCalledProcessInstanceId() {
106 return calledProcessInstanceId;
110 * @param calledProcessInstanceId the calledProcessInstanceId to set
112 public void setCalledProcessInstanceId(final String calledProcessInstanceId) {
113 this.calledProcessInstanceId = calledProcessInstanceId;
117 * @return the startTime
119 public String getStartTime() {
124 * @param startTime the startTime to set
126 public void setStartTime(final String startTime) {
127 this.startTime = startTime;
131 * @return the endTime
133 public String getEndTime() {
138 * @param endTime the endTime to set
140 public void setEndTime(final String endTime) {
141 this.endTime = endTime;
145 * @return the durationInMillis
147 public String getDurationInMillis() {
148 return durationInMillis;
152 * @param durationInMillis the durationInMillis to set
154 public void setDurationInMillis(final String durationInMillis) {
155 this.durationInMillis = durationInMillis;
160 public int hashCode() {
161 final int prime = 31;
163 result = prime * result + ((activityId == null) ? 0 : activityId.hashCode());
164 result = prime * result + ((activityName == null) ? 0 : activityName.hashCode());
165 result = prime * result + ((activityType == null) ? 0 : activityType.hashCode());
166 result = prime * result + ((calledProcessInstanceId == null) ? 0 : calledProcessInstanceId.hashCode());
167 result = prime * result + ((durationInMillis == null) ? 0 : durationInMillis.hashCode());
168 result = prime * result + ((endTime == null) ? 0 : endTime.hashCode());
169 result = prime * result + ((processInstanceId == null) ? 0 : processInstanceId.hashCode());
170 result = prime * result + ((startTime == null) ? 0 : startTime.hashCode());
176 public boolean equals(final Object obj) {
177 if (obj instanceof ActivityInstance) {
178 final ActivityInstance other = (ActivityInstance) obj;
179 return isEqual(activityId, other.activityId) && isEqual(activityName, other.activityName)
180 && isEqual(activityType, other.activityType) && isEqual(processInstanceId, other.processInstanceId)
181 && isEqual(calledProcessInstanceId, other.calledProcessInstanceId)
182 && isEqual(startTime, other.startTime) && isEqual(endTime, other.endTime)
183 && isEqual(durationInMillis, other.durationInMillis);