diff options
Diffstat (limited to 'vid-app-common/src/main/java')
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/controller/AsyncInstantiationController.java | 2 | ||||
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/dal/AsyncInstantiationRepository.kt | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/controller/AsyncInstantiationController.java b/vid-app-common/src/main/java/org/onap/vid/controller/AsyncInstantiationController.java index 96e777a13..c73a01877 100644 --- a/vid-app-common/src/main/java/org/onap/vid/controller/AsyncInstantiationController.java +++ b/vid-app-common/src/main/java/org/onap/vid/controller/AsyncInstantiationController.java @@ -92,7 +92,7 @@ public class AsyncInstantiationController extends VidRestrictedBaseController { if (serviceModelId == null) { return asyncInstantiationBL.getAllServicesInfo(); } else { - return asyncInstantiationRepository.listServicesByServiceModelId(serviceModelId); + return asyncInstantiationRepository.listInstantiatedServicesByServiceModelId(serviceModelId); } } diff --git a/vid-app-common/src/main/java/org/onap/vid/dal/AsyncInstantiationRepository.kt b/vid-app-common/src/main/java/org/onap/vid/dal/AsyncInstantiationRepository.kt index c26b88a5e..e26247281 100644 --- a/vid-app-common/src/main/java/org/onap/vid/dal/AsyncInstantiationRepository.kt +++ b/vid-app-common/src/main/java/org/onap/vid/dal/AsyncInstantiationRepository.kt @@ -90,9 +90,10 @@ class AsyncInstantiationRepository @Autowired constructor(val dataAccessService: " and created >= '" + filterDate + "' " } - private fun filterByServiceModelId(serviceModelUuid: UUID): String { + private fun filterInstantiatedServiceByServiceModelId(serviceModelUuid: UUID): String { return filterServicesByNotHiddenAndNotDeleted() + - " and SERVICE_MODEL_ID = '$serviceModelUuid'" + " and SERVICE_MODEL_ID = '$serviceModelUuid'" + + " and ACTION = 'INSTANTIATE'" } private fun filterServicesByNotHiddenAndNotDeleted(): String { @@ -154,6 +155,6 @@ class AsyncInstantiationRepository @Autowired constructor(val dataAccessService: return dataAccessService.getList(className, " WHERE $condition", orderBy, null) as List<T> } - fun listServicesByServiceModelId(serviceModelId: UUID): List<ServiceInfo> = - dataAccessService.getList(ServiceInfo::class.java, filterByServiceModelId(serviceModelId), orderByCreatedDateAndStatus(), null) as List<ServiceInfo>; + fun listInstantiatedServicesByServiceModelId(serviceModelId: UUID): List<ServiceInfo> = + dataAccessService.getList(ServiceInfo::class.java, filterInstantiatedServiceByServiceModelId(serviceModelId), orderByCreatedDateAndStatus(), null) as List<ServiceInfo>; } |