diff options
author | Shadi Haidar <sh1986@att.com> | 2018-09-06 10:15:36 -0400 |
---|---|---|
committer | Shadi Haidar <sh1986@att.com> | 2018-09-06 13:59:26 -0400 |
commit | eb3234656360fc3409b452c7bcb4e502b467fe35 (patch) | |
tree | 200157cdac0907bd1f28f4a2e379244f4772f70a | |
parent | fc939b4b2f9394488128fcf7ebb584dc036276d6 (diff) |
Inventory to support wild card in typeName
Issue-ID: DCAEGEN2-749
Change-Id: I273f3f8e5466b170f42f3aef0ab21b0ff002be59
Signed-off-by: Shadi Haidar <sh1986@att.com>
-rw-r--r-- | pom.xml | 2 | ||||
-rw-r--r-- | src/main/java/io/swagger/api/impl/DcaeServiceTypesApiServiceImpl.java | 10 |
2 files changed, 9 insertions, 3 deletions
@@ -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>--> 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<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) { |