diff options
Diffstat (limited to 'auth/auth-batch')
-rw-r--r-- | auth/auth-batch/src/main/java/org/onap/aaf/auth/batch/helpers/Creator.java | 14 |
1 files changed, 13 insertions, 1 deletions
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<T> { 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(); |