diff options
author | Rashmi Pujar <rashmi.pujar@bell.ca> | 2019-11-05 17:10:00 -0500 |
---|---|---|
committer | Rashmi Pujar <rashmi.pujar@bell.ca> | 2019-11-07 17:03:48 -0500 |
commit | 3d372e317bff5fe7e27296cab4ed76e759f86994 (patch) | |
tree | 2fef62b9ab7712dff5eea8a227589b7ccc670694 /models-interactions/model-impl/sdc | |
parent | d7fcb9802900c2ce2abacb4f7e01713cdd7ba663 (diff) |
Use lombok annotations for objects in models-interaction/models-impl module
Issue-ID: POLICY-1896
Signed-off-by: Rashmi Pujar <rashmi.pujar@bell.ca>
Change-Id: I425afe25876cea91908391418582ef584e6fe6fc
Diffstat (limited to 'models-interactions/model-impl/sdc')
-rw-r--r-- | models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Service.java | 46 | ||||
-rw-r--r-- | models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ServiceInstance.java | 70 |
2 files changed, 14 insertions, 102 deletions
diff --git a/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Service.java b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Service.java index 709abf9e8..7ab2f9322 100644 --- a/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Service.java +++ b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/Service.java @@ -23,7 +23,11 @@ package org.onap.policy.sdc; import java.io.Serializable; import java.util.UUID; +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter public class Service implements Serializable { private static final long serialVersionUID = -1249276698549996806L; @@ -72,38 +76,6 @@ public class Service implements Serializable { this.serviceVersion = service.serviceVersion; } - public UUID getServiceUUID() { - return serviceUUID; - } - - public void setServiceUUID(UUID serviceUUID) { - this.serviceUUID = serviceUUID; - } - - public UUID getServiceInvariantUUID() { - return serviceInvariantUUID; - } - - public void setServiceInvariantUUID(UUID serviceInvariantUUID) { - this.serviceInvariantUUID = serviceInvariantUUID; - } - - public String getServiceName() { - return serviceName; - } - - public void setServiceName(String serviceName) { - this.serviceName = serviceName; - } - - public String getServiceVersion() { - return serviceVersion; - } - - public void setServiceVersion(String serviceVersion) { - this.serviceVersion = serviceVersion; - } - @Override public String toString() { return "Service [serviceUUID=" + serviceUUID + ", serviceInvariantUUID=" + serviceInvariantUUID @@ -155,13 +127,9 @@ public class Service implements Serializable { return false; } if (serviceVersion == null) { - if (other.serviceVersion != null) { - return false; - } - } else if (!serviceVersion.equals(other.serviceVersion)) { - return false; + return other.serviceVersion == null; + } else { + return serviceVersion.equals(other.serviceVersion); } - return true; } - } diff --git a/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ServiceInstance.java b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ServiceInstance.java index d5f74d4d0..e02952219 100644 --- a/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ServiceInstance.java +++ b/models-interactions/model-impl/sdc/src/main/java/org/onap/policy/sdc/ServiceInstance.java @@ -23,7 +23,11 @@ package org.onap.policy.sdc; import java.io.Serializable; import java.util.UUID; +import lombok.Getter; +import lombok.Setter; +@Getter +@Setter public class ServiceInstance implements Serializable { private static final long serialVersionUID = 6285260780966679625L; @@ -58,62 +62,6 @@ public class ServiceInstance implements Serializable { this.serviceInstanceName = instance.serviceInstanceName; } - public UUID getPersonaModelUUID() { - return personaModelUUID; - } - - public void setPersonaModelUUID(UUID personaModelUUID) { - this.personaModelUUID = personaModelUUID; - } - - public UUID getServiceUUID() { - return serviceUUID; - } - - public void setServiceUUID(UUID serviceUUID) { - this.serviceUUID = serviceUUID; - } - - public UUID getServiceInstanceUUID() { - return serviceInstanceUUID; - } - - public void setServiceInstanceUUID(UUID serviceInstanceUUID) { - this.serviceInstanceUUID = serviceInstanceUUID; - } - - public UUID getWidgetModelUUID() { - return widgetModelUUID; - } - - public void setWidgetModelUUID(UUID widgetModelUUID) { - this.widgetModelUUID = widgetModelUUID; - } - - public String getWidgetModelVersion() { - return widgetModelVersion; - } - - public void setWidgetModelVersion(String widgetModelVersion) { - this.widgetModelVersion = widgetModelVersion; - } - - public String getServiceName() { - return serviceName; - } - - public void setServiceName(String serviceName) { - this.serviceName = serviceName; - } - - public String getServiceInstanceName() { - return serviceInstanceName; - } - - public void setServiceInstanceName(String serviceInstanceName) { - this.serviceInstanceName = serviceInstanceName; - } - @Override public String toString() { return "ServiceInstance [personaModelUUID=" + personaModelUUID + ", serviceUUID=" + serviceUUID @@ -191,13 +139,9 @@ public class ServiceInstance implements Serializable { return false; } if (widgetModelVersion == null) { - if (other.widgetModelVersion != null) { - return false; - } - } else if (!widgetModelVersion.equals(other.widgetModelVersion)) { - return false; + return other.widgetModelVersion == null; + } else { + return widgetModelVersion.equals(other.widgetModelVersion); } - return true; } - } |