Update java files with correct license text
[appc.git] / appc-config / appc-flow-controller / provider / src / main / java / org / onap / appc / flow / controller / data / PrecheckOption.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP : APPC
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * =============================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  * ECOMP is a trademark and service mark of AT&T Intellectual Property.
20  * ============LICENSE_END=========================================================
21  */
22 package org.onap.appc.flow.controller.data;
23
24 import com.fasterxml.jackson.annotation.JsonProperty;
25
26 public class PrecheckOption {
27
28
29     @JsonProperty("pre-transaction-id")
30     private int pTransactionID;
31
32     @JsonProperty("param-name")
33     private String paramName;
34
35
36     @JsonProperty("param-value")
37     private String paramValue;
38
39     @JsonProperty("rule")
40     private String rule;
41
42     public int getpTransactionID() {
43         return pTransactionID;
44     }
45
46     public void setpTransactionID(int pTransactionID) {
47         this.pTransactionID = pTransactionID;
48     }
49
50     public String getParamName() {
51         return paramName;
52     }
53
54     public void setParamName(String paramName) {
55         this.paramName = paramName;
56     }
57
58     public String getParamValue() {
59         return paramValue;
60     }
61
62     public void setParamValue(String paramValue) {
63         this.paramValue = paramValue;
64     }
65
66     @Override
67     public String toString() {
68         return "PrecheckOption [pTransactionID=" + pTransactionID + ", paramName=" + paramName + ", paramValue="
69                 + paramValue + ", rule=" + rule + "]";
70     }
71
72     public String getRule() {
73         return rule;
74     }
75
76     public void setRule(String rule) {
77         this.rule = rule;
78     }
79
80     @Override
81     public int hashCode() {
82         final int prime = 31;
83         int result = 1;
84         result = prime * result + this.pTransactionID;
85         result = prime * result + this.paramName.hashCode();
86         result = prime * result + this.paramValue.hashCode();
87         result = prime * result + this.rule.hashCode();
88         return result;
89     }
90
91     @Override
92     public boolean equals(Object obj) {
93         if (this == obj)
94             return true;
95         if (obj == null)
96             return false;
97         if (getClass() != obj.getClass())
98             return false;
99         PrecheckOption other = (PrecheckOption) obj;
100         if (pTransactionID != other.pTransactionID)
101             return false;
102         if (paramName == null) {
103             if (other.paramName != null)
104                 return false;
105         } else if (!paramName.equals(other.paramName))
106             return false;
107         if (paramValue == null) {
108             if (other.paramValue != null)
109                 return false;
110         } else if (!paramValue.equals(other.paramValue))
111             return false;
112         if (rule != other.rule)
113             return false;
114         return true;
115     }
116 }