starts threads each for every supported collector
[dcaegen2/services/mapper.git] / UniversalVesAdapter / src / main / java / org / onap / dcaegen2 / ves / domain / ObjectKey.java
1 /*
2 * ============LICENSE_START=======================================================
3 * ONAP : DCAE
4 * ================================================================================
5 * Copyright 2018 TechMahindra
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 * ============LICENSE_END=========================================================
19 */
20 package org.onap.dcaegen2.ves.domain;
21
22 import java.util.HashMap;
23 import java.util.Map;
24 import com.fasterxml.jackson.annotation.JsonAnyGetter;
25 import com.fasterxml.jackson.annotation.JsonAnySetter;
26 import com.fasterxml.jackson.annotation.JsonIgnore;
27 import com.fasterxml.jackson.annotation.JsonInclude;
28 import com.fasterxml.jackson.annotation.JsonProperty;
29 import com.fasterxml.jackson.annotation.JsonPropertyOrder;
30 import org.apache.commons.lang.builder.EqualsBuilder;
31 import org.apache.commons.lang.builder.HashCodeBuilder;
32 import org.apache.commons.lang.builder.ToStringBuilder;
33
34 @JsonInclude(JsonInclude.Include.NON_NULL)
35 @JsonPropertyOrder({
36     "keyName",
37     "keyOrder",
38     "keyValue"
39 })
40 public class ObjectKey {
41
42     @JsonProperty("keyName")
43     private String keyName;
44     @JsonProperty("keyOrder")
45     private Long keyOrder;
46     @JsonProperty("keyValue")
47     private String keyValue;
48     @JsonIgnore
49     private Map<String, Object> additionalProperties = new HashMap<String, Object>();
50
51     @JsonProperty("keyName")
52     public String getKeyName() {
53         return keyName;
54     }
55
56     @JsonProperty("keyName")
57     public void setKeyName(String keyName) {
58         this.keyName = keyName;
59     }
60
61     @JsonProperty("keyOrder")
62     public Long getKeyOrder() {
63         return keyOrder;
64     }
65
66     @JsonProperty("keyOrder")
67     public void setKeyOrder(Long keyOrder) {
68         this.keyOrder = keyOrder;
69     }
70
71     @JsonProperty("keyValue")
72     public String getKeyValue() {
73         return keyValue;
74     }
75
76     @JsonProperty("keyValue")
77     public void setKeyValue(String keyValue) {
78         this.keyValue = keyValue;
79     }
80
81     @JsonAnyGetter
82     public Map<String, Object> getAdditionalProperties() {
83         return this.additionalProperties;
84     }
85
86     @JsonAnySetter
87     public void setAdditionalProperty(String name, Object value) {
88         this.additionalProperties.put(name, value);
89     }
90
91     @Override
92     public String toString() {
93         return new ToStringBuilder(this).append("keyName", keyName).append("keyOrder", keyOrder).append("keyValue", keyValue).append("additionalProperties", additionalProperties).toString();
94     }
95
96     @Override
97     public int hashCode() {
98         return new HashCodeBuilder().append(keyName).append(additionalProperties).append(keyOrder).append(keyValue).toHashCode();
99     }
100
101     @Override
102     public boolean equals(Object other) {
103         if (other == this) {
104             return true;
105         }
106         if ((other instanceof ObjectKey) == false) {
107             return false;
108         }
109         ObjectKey rhs = ((ObjectKey) other);
110         return new EqualsBuilder().append(keyName, rhs.keyName).append(additionalProperties, rhs.additionalProperties).append(keyOrder, rhs.keyOrder).append(keyValue, rhs.keyValue).isEquals();
111     }
112
113 }