aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorShadi Haidar <sh1986@att.com>2018-09-06 10:15:36 -0400
committerShadi Haidar <sh1986@att.com>2018-09-06 13:59:26 -0400
commiteb3234656360fc3409b452c7bcb4e502b467fe35 (patch)
tree200157cdac0907bd1f28f4a2e379244f4772f70a /src
parentfc939b4b2f9394488128fcf7ebb584dc036276d6 (diff)
Inventory to support wild card in typeName
Issue-ID: DCAEGEN2-749 Change-Id: I273f3f8e5466b170f42f3aef0ab21b0ff002be59 Signed-off-by: Shadi Haidar <sh1986@att.com>
Diffstat (limited to 'src')
-rw-r--r--src/main/java/io/swagger/api/impl/DcaeServiceTypesApiServiceImpl.java10
1 files changed, 8 insertions, 2 deletions
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) {