X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=models-interactions%2Fmodel-impl%2Fsdc%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fsdc%2FResource.java;h=d5e8b6c2a0399f5d8bc60d751a431931cbaa5361;hb=658d2377a96284739b283b855b80dd80196dc91f;hp=61b6e3afd4c8d8df88ae0ccc3fde02c99b617688;hpb=c2e24def7c1de97838af00560bdb0bf84f3abc4b;p=policy%2Fmodels.git diff --git a/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Resource.java b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Resource.java index 61b6e3afd..d5e8b6c2a 100644 --- a/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Resource.java +++ b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Resource.java @@ -3,7 +3,7 @@ * sdc * ================================================================================ * Copyright (C) 2017-2019 AT&T Intellectual Property. All rights reserved. - * Modifications Copyright (C) 2019 Nordix Foundation. + * Modifications Copyright (C) 2019-2020 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,23 +23,22 @@ package org.onap.policy.sdc; import java.io.Serializable; import java.util.UUID; -import lombok.Getter; -import lombok.Setter; -@Getter -@Setter +import lombok.Data; + +@Data public class Resource implements Serializable { private static final long serialVersionUID = -913729158733348027L; - private UUID resourceUuid; - private UUID resourceInvariantUuid; - private String resourceName; - private String resourceVersion; - private String resourceType; + private UUID resourceUuid; + private UUID resourceInvariantUuid; + private String resourceName; + private String resourceVersion; + private String resourceType; public Resource() { - //Empty Constructor + // Empty Constructor } /** @@ -80,74 +79,4 @@ public class Resource implements Serializable { this.resourceVersion = version; this.resourceType = type; } - - @Override - public String toString() { - return "Resource [resourceUuid=" + resourceUuid + ", resourceInvariantUuid=" + resourceInvariantUuid - + ", resourceName=" + resourceName + ", resourceVersion=" + resourceVersion + ", resourceType=" - + resourceType + "]"; - } - - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((resourceInvariantUuid == null) ? 0 : resourceInvariantUuid.hashCode()); - result = prime * result + ((resourceName == null) ? 0 : resourceName.hashCode()); - result = prime * result + ((resourceType == null) ? 0 : resourceType.hashCode()); - result = prime * result + ((resourceUuid == null) ? 0 : resourceUuid.hashCode()); - result = prime * result + ((resourceVersion == null) ? 0 : resourceVersion.hashCode()); - return result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - Resource other = (Resource) obj; - if (resourceInvariantUuid == null) { - if (other.resourceInvariantUuid != null) { - return false; - } - } else if (!resourceInvariantUuid.equals(other.resourceInvariantUuid)) { - return false; - } - if (resourceName == null) { - if (other.resourceName != null) { - return false; - } - } else if (!resourceName.equals(other.resourceName)) { - return false; - } - if (resourceType == null) { - if (other.resourceType != null) { - return false; - } - } else if (!resourceType.equals(other.resourceType)) { - return false; - } - if (resourceUuid == null) { - if (other.resourceUuid != null) { - return false; - } - } else if (!resourceUuid.equals(other.resourceUuid)) { - return false; - } - if (resourceVersion == null) { - if (other.resourceVersion != null) { - return false; - } - } else if (!resourceVersion.equals(other.resourceVersion)) { - return false; - } - return true; - } - }