diff options
author | Abhai Singh <Abhai.Singh@amdocs.com> | 2018-01-03 18:57:21 +0530 |
---|---|---|
committer | Vitaly Emporopulo <Vitaliy.Emporopulo@amdocs.com> | 2018-01-03 14:34:13 +0000 |
commit | f37bd6e8dc0489f4d008b5bd6c950b5092959b77 (patch) | |
tree | 4e431eb5704d1139d47aa13478b97a5952bdc4ed | |
parent | 7a74c4895e304690679573f6f421b0f5c4998853 (diff) |
Fix Sonar -ComponentDependencyModelDaoZusammenImpl
Fixed reported sonar issue
Change-Id: I6c8b86cb54bcc6d21920e9ea806dcd40717c2383
Issue-ID: SDC-343
Signed-off-by: Abhai Singh <Abhai.Singh@amdocs.com>
1 files changed, 17 insertions, 13 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/ComponentDependencyModelDaoZusammenImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/ComponentDependencyModelDaoZusammenImpl.java index 6741d72bd2..d98a67c72a 100644 --- a/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/ComponentDependencyModelDaoZusammenImpl.java +++ b/openecomp-be/lib/openecomp-sdc-vendor-software-product-lib/openecomp-sdc-vendor-software-product-core/src/main/java/org/openecomp/sdc/vendorsoftwareproduct/dao/impl/zusammen/ComponentDependencyModelDaoZusammenImpl.java @@ -10,8 +10,6 @@ import com.amdocs.zusammen.datatypes.item.ElementContext; import com.amdocs.zusammen.datatypes.item.Info; import org.openecomp.core.zusammen.api.ZusammenAdaptor; import org.openecomp.sdc.datatypes.model.ElementType; -import org.openecomp.sdc.logging.api.Logger; -import org.openecomp.sdc.logging.api.LoggerFactory; import org.openecomp.sdc.vendorsoftwareproduct.dao.ComponentDependencyModelDao; import org.openecomp.sdc.vendorsoftwareproduct.dao.impl.zusammen.convertor.ElementToComponentDependencyModelConvertor; import org.openecomp.sdc.vendorsoftwareproduct.dao.type.ComponentDependencyModelEntity; @@ -31,9 +29,6 @@ import static org.openecomp.core.zusammen.api.ZusammenUtil.createSessionContext; */ public class ComponentDependencyModelDaoZusammenImpl implements ComponentDependencyModelDao { - private static final Logger logger = - LoggerFactory.getLogger(OrchestrationTemplateCandidateDaoZusammenImpl.class); - private ZusammenAdaptor zusammenAdaptor; public ComponentDependencyModelDaoZusammenImpl(ZusammenAdaptor zusammenAdaptor) { @@ -151,11 +146,10 @@ public class ComponentDependencyModelDaoZusammenImpl implements ComponentDepende Info info = new Info(); info.addProperty(ElementPropertyName.elementType.name(), ElementType.ComponentDependency); - //info.addProperty(ComponentDependencyModelPropertyName.id.name(), entity.getId()); - info.addProperty(ComponentDependencyModelPropertyName.relation.name(), compDep.getRelation()); - info.addProperty(ComponentDependencyModelPropertyName.sourcecomponent_id.name(), + info.addProperty(ComponentDependencyModelPropertyName.RELATION.getVal(), compDep.getRelation()); + info.addProperty(ComponentDependencyModelPropertyName.SOURCE_COMPONENT_ID.getVal(), compDep.getSourceComponentId()); - info.addProperty(ComponentDependencyModelPropertyName.targetcomponent_id.name(), + info.addProperty(ComponentDependencyModelPropertyName.TARGET_COMPONENT_ID.getVal(), compDep.getTargetComponentId()); componentDependencyElement.setInfo(info); @@ -164,9 +158,19 @@ public class ComponentDependencyModelDaoZusammenImpl implements ComponentDepende } private enum ComponentDependencyModelPropertyName { - id, - relation, - sourcecomponent_id, - targetcomponent_id, + ID("id"), + RELATION("relation"), + SOURCE_COMPONENT_ID("sourcecomponent_id"), + TARGET_COMPONENT_ID("targetcomponent_id"); + + private String val; + + ComponentDependencyModelPropertyName(String val){ + this.val=val; + } + + public String getVal() { + return val; + } } } |