Inventory to support wild card in typeName 17/65017/2
authorShadi Haidar <sh1986@att.com>
Thu, 6 Sep 2018 14:15:36 +0000 (10:15 -0400)
committerShadi Haidar <sh1986@att.com>
Thu, 6 Sep 2018 17:59:26 +0000 (13:59 -0400)
Issue-ID: DCAEGEN2-749

Change-Id: I273f3f8e5466b170f42f3aef0ab21b0ff002be59
Signed-off-by: Shadi Haidar <sh1986@att.com>
pom.xml
src/main/java/io/swagger/api/impl/DcaeServiceTypesApiServiceImpl.java

diff --git a/pom.xml b/pom.xml
index e74dc68..d840ca7 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@ ECOMP is a trademark and service mark of AT&T Intellectual Property.
 
     <groupId>org.onap.dcaegen2.platform</groupId>
     <artifactId>inventory-api</artifactId>
-    <version>3.0.2</version>
+    <version>3.0.3</version>
     <name>dcaegen2-platform-inventory-api</name>
     <!--internal <version>3.0.0</version>-->
 
index 0cb108c..feafd20 100644 (file)
@@ -94,9 +94,15 @@ public class DcaeServiceTypesApiServiceImpl extends DcaeServiceTypesApiService {
             }
 
             List<String> 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) {