From: Shadi Haidar Date: Thu, 6 Sep 2018 14:15:36 +0000 (-0400) Subject: Inventory to support wild card in typeName X-Git-Tag: 3.0.4~5 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=eb3234656360fc3409b452c7bcb4e502b467fe35;p=dcaegen2%2Fplatform%2Finventory-api.git Inventory to support wild card in typeName Issue-ID: DCAEGEN2-749 Change-Id: I273f3f8e5466b170f42f3aef0ab21b0ff002be59 Signed-off-by: Shadi Haidar --- diff --git a/pom.xml b/pom.xml index e74dc68..d840ca7 100644 --- a/pom.xml +++ b/pom.xml @@ -29,7 +29,7 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property. org.onap.dcaegen2.platform inventory-api - 3.0.2 + 3.0.3 dcaegen2-platform-inventory-api diff --git a/src/main/java/io/swagger/api/impl/DcaeServiceTypesApiServiceImpl.java b/src/main/java/io/swagger/api/impl/DcaeServiceTypesApiServiceImpl.java index 0cb108c..feafd20 100644 --- a/src/main/java/io/swagger/api/impl/DcaeServiceTypesApiServiceImpl.java +++ b/src/main/java/io/swagger/api/impl/DcaeServiceTypesApiServiceImpl.java @@ -94,9 +94,15 @@ public class DcaeServiceTypesApiServiceImpl extends DcaeServiceTypesApiService { } List whereClauses = new ArrayList<>(); - + if (typeName != null) { - whereClauses.add(":typeName = type_name"); + if (!typeName.contains("*")) { + whereClauses.add(":typeName = type_name"); + } + else { + typeName = typeName.replaceAll("\\*", "%"); + whereClauses.add("type_name LIKE :typeName"); + } } if (vnfType != null) {