Remove mso-oof-adapter from SO
[so.git] / so-monitoring / so-monitoring-handler / src / main / java / org / onap / so / monitoring / camunda / model / ProcessDefinition.java
1 /*-
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
8  * 
9  *      http://www.apache.org/licenses/LICENSE-2.0
10  * 
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.
16  * 
17  * SPDX-License-Identifier: Apache-2.0
18  * ============LICENSE_END=========================================================
19  */
20 package org.onap.so.monitoring.camunda.model;
21
22 import static org.onap.so.monitoring.utils.ObjectEqualsUtils.isEqual;
23 import com.fasterxml.jackson.annotation.JsonIgnore;
24 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
25
26 /**
27  * @author waqas.ikram@ericsson.com
28  *
29  */
30 @JsonIgnoreProperties(ignoreUnknown = true)
31 public class ProcessDefinition {
32
33     private String id;
34     private String bpmn20Xml;
35
36     public ProcessDefinition() {}
37
38     /**
39      * @return the id
40      */
41     public String getId() {
42         return id;
43     }
44
45     /**
46      * @param id the id to set
47      */
48     public void setId(final String id) {
49         this.id = id;
50     }
51
52     /**
53      * @return the bpmn20Xml
54      */
55     public String getBpmn20Xml() {
56         return bpmn20Xml;
57     }
58
59     /**
60      * @param bpmn20Xml the bpmn20Xml to set
61      */
62     public void setBpmn20Xml(final String bpmn20Xml) {
63         this.bpmn20Xml = bpmn20Xml;
64     }
65
66     @JsonIgnore
67     @Override
68     public int hashCode() {
69         final int prime = 31;
70         int result = 1;
71         result = prime * result + ((id == null) ? 0 : id.hashCode());
72         result = prime * result + ((bpmn20Xml == null) ? 0 : bpmn20Xml.hashCode());
73         return result;
74     }
75
76     @JsonIgnore
77     @Override
78     public boolean equals(final Object obj) {
79         if (obj instanceof ProcessDefinition) {
80             final ProcessDefinition other = (ProcessDefinition) obj;
81             return isEqual(id, other.id) && isEqual(bpmn20Xml, other.bpmn20Xml);
82         }
83         return false;
84     }
85
86
87 }