2 * ============LICENSE_START=======================================================
3 * ONAP : ccsdk features
4 * ================================================================================
5 * Copyright (C) 2020 highstreet technologies GmbH Intellectual Property.
7 * ================================================================================
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 * ============LICENSE_END=========================================================
22 package org.onap.ccsdk.features.sdnr.wt.dataprovider.database.sqldb.data;
24 import com.google.common.base.MoreObjects;
25 import java.util.Objects;
26 import javax.annotation.processing.Generated;
27 import org.opendaylight.yangtools.yang.binding.Augmentable;
28 import org.opendaylight.yangtools.yang.binding.CodeHelpers;
29 import org.opendaylight.yangtools.yang.binding.DataObject;
34 * This class represents the following YANG schema fragment defined in module <b>data-provider</b>
37 * container userdata {
47 * The schema path to identify an instance is <i>data-provider/userdata</i>
50 * To create instances of this class use {@link UserdataBuilder}.
52 * @see UserdataBuilder
55 @Generated("mdsal-binding-generator")
56 public interface Userdata extends Augmentable<Userdata>, DataObject {
59 * Default implementation of {@link Object#hashCode()} contract for this interface. Implementations of this
60 * interface are encouraged to defer to this method to get consistent hashing results across all implementations.
62 * @param obj Object for which to generate hashCode() result.
63 * @return Hash code value of data modeled by this interface.
64 * @throws NullPointerException if {@code obj} is null
66 static int bindingHashCode(final Userdata obj) {
69 result = prime * result + Objects.hashCode(obj.getId());
70 result = prime * result + Objects.hashCode(obj.getValue());
71 result = prime * result + obj.augmentations().hashCode();
76 * Default implementation of {@link Object#equals(Object)} contract for this interface. Implementations of this
77 * interface are encouraged to defer to this method to get consistent equality results across all implementations.
79 * @param thisObj Object acting as the receiver of equals invocation
80 * @param obj Object acting as argument to equals invocation
81 * @return True if thisObj and obj are considered equal
82 * @throws NullPointerException if {@code thisObj} is null
84 static boolean bindingEquals(final Userdata thisObj, final Object obj) {
88 final Userdata other = CodeHelpers.checkCast(Userdata.class, obj);
92 if (!Objects.equals(thisObj.getId(), other.getId())) {
95 if (!Objects.equals(thisObj.getValue(), other.getValue())) {
98 return thisObj.augmentations().equals(other.augmentations());
102 * Default implementation of {@link Object#toString()} contract for this interface. Implementations of this
103 * interface are encouraged to defer to this method to get consistent string representations across all
106 * @param obj Object for which to generate toString() result.
107 * @return {@link String} value of data modeled by this interface.
108 * @throws NullPointerException if {@code obj} is null
110 static String bindingToString(final Userdata obj) {
111 final MoreObjects.ToStringHelper helper = MoreObjects.toStringHelper("Userdata");
112 CodeHelpers.appendValue(helper, "id", obj.getId());
113 CodeHelpers.appendValue(helper, "value", obj.getValue());
114 CodeHelpers.appendValue(helper, "augmentation", obj.augmentations().values());
115 return helper.toString();
119 * Return id, or {@code null} if it is not present.
121 * @return {@code java.lang.String} id, or {@code null} if it is not present.
127 * Return value, or {@code null} if it is not present.
129 * @return {@code java.lang.String} value, or {@code null} if it is not present.