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;
 
  23 import com.fasterxml.jackson.annotation.JsonIgnore;
 
  24 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
 
  27  * @author waqas.ikram@ericsson.com
 
  30 @JsonIgnoreProperties(ignoreUnknown = true)
 
  31 public class ActivityInstance {
 
  33     private String activityId;
 
  34     private String activityName;
 
  35     private String activityType;
 
  36     private String processInstanceId;
 
  37     private String calledProcessInstanceId;
 
  38     private String startTime;
 
  39     private String endTime;
 
  40     private String durationInMillis;
 
  42     public ActivityInstance() {}
 
  46      * @return the activityId
 
  48     public String getActivityId() {
 
  53      * @param activityId the activityId to set
 
  55     public void setActivityId(final String activityId) {
 
  56         this.activityId = activityId;
 
  60      * @return the activityName
 
  62     public String getActivityName() {
 
  67      * @param activityName the activityName to set
 
  69     public void setActivityName(final String activityName) {
 
  70         this.activityName = activityName;
 
  74      * @return the activityType
 
  76     public String getActivityType() {
 
  81      * @param activityType the activityType to set
 
  83     public void setActivityType(final String activityType) {
 
  84         this.activityType = activityType;
 
  88      * @return the processInstanceId
 
  90     public String getProcessInstanceId() {
 
  91         return processInstanceId;
 
  95      * @param processInstanceId the processInstanceId to set
 
  97     public void setProcessInstanceId(final String processInstanceId) {
 
  98         this.processInstanceId = processInstanceId;
 
 102      * @return the calledProcessInstanceId
 
 104     public String getCalledProcessInstanceId() {
 
 105         return calledProcessInstanceId;
 
 109      * @param calledProcessInstanceId the calledProcessInstanceId to set
 
 111     public void setCalledProcessInstanceId(final String calledProcessInstanceId) {
 
 112         this.calledProcessInstanceId = calledProcessInstanceId;
 
 116      * @return the startTime
 
 118     public String getStartTime() {
 
 123      * @param startTime the startTime to set
 
 125     public void setStartTime(final String startTime) {
 
 126         this.startTime = startTime;
 
 130      * @return the endTime
 
 132     public String getEndTime() {
 
 137      * @param endTime the endTime to set
 
 139     public void setEndTime(final String endTime) {
 
 140         this.endTime = endTime;
 
 144      * @return the durationInMillis
 
 146     public String getDurationInMillis() {
 
 147         return durationInMillis;
 
 151      * @param durationInMillis the durationInMillis to set
 
 153     public void setDurationInMillis(final String durationInMillis) {
 
 154         this.durationInMillis = durationInMillis;
 
 159     public int hashCode() {
 
 160         final int prime = 31;
 
 162         result = prime * result + ((activityId == null) ? 0 : activityId.hashCode());
 
 163         result = prime * result + ((activityName == null) ? 0 : activityName.hashCode());
 
 164         result = prime * result + ((activityType == null) ? 0 : activityType.hashCode());
 
 165         result = prime * result + ((calledProcessInstanceId == null) ? 0 : calledProcessInstanceId.hashCode());
 
 166         result = prime * result + ((durationInMillis == null) ? 0 : durationInMillis.hashCode());
 
 167         result = prime * result + ((endTime == null) ? 0 : endTime.hashCode());
 
 168         result = prime * result + ((processInstanceId == null) ? 0 : processInstanceId.hashCode());
 
 169         result = prime * result + ((startTime == null) ? 0 : startTime.hashCode());
 
 175     public boolean equals(final Object obj) {
 
 176         if (obj instanceof ActivityInstance) {
 
 177             final ActivityInstance other = (ActivityInstance) obj;
 
 178             return isEqual(activityId, other.activityId) && isEqual(activityName, other.activityName)
 
 179                     && isEqual(activityType, other.activityType) && isEqual(processInstanceId, other.processInstanceId)
 
 180                     && isEqual(calledProcessInstanceId, other.calledProcessInstanceId)
 
 181                     && isEqual(startTime, other.startTime) && isEqual(endTime, other.endTime)
 
 182                     && isEqual(durationInMillis, other.durationInMillis);