2 * ============LICENSE_START=======================================================
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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=========================================================
20 package org.onap.dcaegen2.ves.domain;
22 import java.util.HashMap;
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;
34 @JsonInclude(JsonInclude.Include.NON_NULL)
40 public class ObjectKey {
42 @JsonProperty("keyName")
43 private String keyName;
44 @JsonProperty("keyOrder")
45 private Long keyOrder;
46 @JsonProperty("keyValue")
47 private String keyValue;
49 private Map<String, Object> additionalProperties = new HashMap<String, Object>();
51 @JsonProperty("keyName")
52 public String getKeyName() {
56 @JsonProperty("keyName")
57 public void setKeyName(String keyName) {
58 this.keyName = keyName;
61 @JsonProperty("keyOrder")
62 public Long getKeyOrder() {
66 @JsonProperty("keyOrder")
67 public void setKeyOrder(Long keyOrder) {
68 this.keyOrder = keyOrder;
71 @JsonProperty("keyValue")
72 public String getKeyValue() {
76 @JsonProperty("keyValue")
77 public void setKeyValue(String keyValue) {
78 this.keyValue = keyValue;
82 public Map<String, Object> getAdditionalProperties() {
83 return this.additionalProperties;
87 public void setAdditionalProperty(String name, Object value) {
88 this.additionalProperties.put(name, value);
92 public String toString() {
93 return new ToStringBuilder(this).append("keyName", keyName).append("keyOrder", keyOrder).append("keyValue", keyValue).append("additionalProperties", additionalProperties).toString();
97 public int hashCode() {
98 return new HashCodeBuilder().append(keyName).append(additionalProperties).append(keyOrder).append(keyValue).toHashCode();
102 public boolean equals(Object other) {
106 if ((other instanceof ObjectKey) == false) {
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();