From ff1417ff60baee231a28272f9a16ef2c9c8ea0a2 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Wed, 29 May 2019 04:58:50 -0500 Subject: Post Init Service Starter minor fixes Remove JU generated garbage files Issue-ID: AAF-835 Change-Id: I476291f1f1140f0640ed49452f8a5dabb28d9c30 Signed-off-by: Instrumental --- .../main/java/org/onap/aaf/auth/batch/helpers/Creator.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'auth/auth-batch/src/main/java/org') diff --git a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Creator.java b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Creator.java index 152c6331..9d0cfa7f 100644 --- a/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Creator.java +++ b/auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Creator.java @@ -27,11 +27,23 @@ public abstract class Creator { public abstract T create(Row row); public abstract String select(); + public String suffix() { + return ""; + } + public String query(String where) { StringBuilder sb = new StringBuilder(select()); if (where!=null) { sb.append(" WHERE "); - sb.append(where); + int index = where.indexOf(" ALLOW FILTERING"); + if(index< 0 ) { + sb.append(where); + sb.append(suffix()); + } else { + sb.append(where.substring(0, index)); + sb.append(suffix()); + sb.append(" ALLOW FILTERING"); + } } sb.append(';'); return sb.toString(); -- cgit 1.2.3-korg