Tests coverage up and some minor bug fixes
[portal.git] / portal-BE / src / main / java / org / onap / portal / service / ep / EpMicroserviceParameterService.java
index e5f84e7..6fa8b7d 100644 (file)
@@ -51,8 +51,10 @@ import org.onap.portal.domain.dto.ecomp.MicroserviceParameter;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
 
 @Service
+@Transactional
 public class EpMicroserviceParameterService {
 
        EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(EpWidgetCatalogParameterService.class);
@@ -88,4 +90,15 @@ public class EpMicroserviceParameterService {
        public EpMicroserviceParameter save(EpMicroserviceParameter epMicroserviceParameter){
               return epMicroserviceParameterDao.save(epMicroserviceParameter);
        }
+
+       @Transactional
+       public boolean deleteMicroserviceParameterById(final Long paramid){
+              try {
+                     epMicroserviceParameterDao.deleteById(paramid);
+                     return true;
+              }catch (Exception e){
+                     logger.error(EELFLoggerDelegate.errorLogger, e.getMessage());
+                     return false;
+              }
+       }
 }