diff options
author | shrek2000 <orenkle@amdocs.com> | 2019-06-05 14:02:47 +0300 |
---|---|---|
committer | Avi Gaffa <avi.gaffa@amdocs.com> | 2019-06-05 13:16:18 +0000 |
commit | 2e3f83457728d9f39dc06c728b488bd5e98f083d (patch) | |
tree | ae9b40410048b67d949466388d7c614bf9a00b1b | |
parent | 39cfb30f0e15b292ce348ba17e0a472cfff6b264 (diff) |
Add lombok support to simple classes
Change-Id: Id4db17168cce9a6a02138c2c6bd74971159994dc
Issue-ID: SDC-2354
Signed-off-by: shrek2000 <orenkle@amdocs.com>
-rw-r--r-- | common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/NodeTemplate.java | 129 |
1 files changed, 6 insertions, 123 deletions
diff --git a/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/NodeTemplate.java b/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/NodeTemplate.java index 0f99841f9a..82f1581fa9 100644 --- a/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/NodeTemplate.java +++ b/common/onap-tosca-datatype/src/main/java/org/onap/sdc/tosca/datatypes/model/NodeTemplate.java @@ -23,13 +23,18 @@ package org.onap.sdc.tosca.datatypes.model; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.Optional; +import lombok.EqualsAndHashCode; +import lombok.Getter; +import lombok.Setter; import org.apache.commons.collections4.MapUtils; import org.onap.sdc.tosca.error.ToscaRuntimeException; import org.onap.sdc.tosca.services.YamlUtil; +@Getter +@Setter +@EqualsAndHashCode public class NodeTemplate implements Template, Cloneable { private String type; @@ -45,77 +50,6 @@ public class NodeTemplate implements Template, Cloneable { private NodeFilter node_filter; private String copy; - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Map<String, String> getMetadata() { - return metadata; - } - - public void setMetadata(Map<String, String> metadata) { - this.metadata = metadata; - } - - public List<String> getDirectives() { - return directives; - } - - public void setDirectives(List<String> directives) { - this.directives = directives; - } - - public Map<String, Object> getProperties() { - return properties; - } - - public void setProperties(Map<String, Object> properties) { - this.properties = properties; - } - - public Map<String, Object> getAttributes() { - return attributes; - } - - public void setAttributes(Map<String, Object> attributes) { - this.attributes = attributes; - } - - public List<Map<String, RequirementAssignment>> getRequirements() { - return requirements; - } - - public void setRequirements(List<Map<String, RequirementAssignment>> requirements) { - this.requirements = requirements; - } - - public Map<String, CapabilityAssignment> getCapabilities() { - return capabilities; - } - - public void setCapabilities(Map<String, CapabilityAssignment> capabilities) { - this.capabilities = capabilities; - } - - public Map<String, Object> getInterfaces() { - return interfaces; - } - - public void setInterfaces(Map<String, Object> interfaces) { - this.interfaces = interfaces; - } public Map<String, InterfaceDefinitionTemplate> getNormalizeInterfaces() { if (MapUtils.isEmpty(interfaces)) { @@ -146,29 +80,6 @@ public class NodeTemplate implements Template, Cloneable { } - public Map<String, ArtifactDefinition> getArtifacts() { - return artifacts; - } - - public void setArtifacts(Map<String, ArtifactDefinition> artifacts) { - this.artifacts = artifacts; - } - - public NodeFilter getNode_filter() { - return node_filter; - } - - public void setNode_filter(NodeFilter nodeFilter) { - this.node_filter = nodeFilter; - } - - public String getCopy() { - return copy; - } - - public void setCopy(String copy) { - this.copy = copy; - } @Override public NodeTemplate clone() { @@ -176,33 +87,5 @@ public class NodeTemplate implements Template, Cloneable { return yamlUtil.yamlToObject(yamlUtil.objectToYaml(this), NodeTemplate.class); } - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (!(o instanceof NodeTemplate)) { - return false; - } - NodeTemplate that = (NodeTemplate) o; - return Objects.equals(type, that.type) - && Objects.equals(description, that.description) - && Objects.equals(metadata, that.metadata) - && Objects.equals(directives, that.directives) - && Objects.equals(properties, that.properties) - && Objects.equals(attributes, that.attributes) - && Objects.equals(requirements, that.requirements) - && Objects.equals(capabilities, that.capabilities) - && Objects.equals(interfaces, that.interfaces) - && Objects.equals(artifacts, that.artifacts) - && Objects.equals(node_filter, that.node_filter) - && Objects.equals(copy, that.copy); - } - @Override - public int hashCode() { - - return Objects.hash(type, description, metadata, directives, properties, attributes, requirements, capabilities, - interfaces, artifacts, node_filter, copy); - } } |