diff options
Diffstat (limited to 'aai-core/src/main/java/org/onap/aai/query/builder/GremlinQueryBuilder.java')
-rw-r--r-- | aai-core/src/main/java/org/onap/aai/query/builder/GremlinQueryBuilder.java | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/aai-core/src/main/java/org/onap/aai/query/builder/GremlinQueryBuilder.java b/aai-core/src/main/java/org/onap/aai/query/builder/GremlinQueryBuilder.java index 43925f49..1dc2cfe8 100644 --- a/aai-core/src/main/java/org/onap/aai/query/builder/GremlinQueryBuilder.java +++ b/aai-core/src/main/java/org/onap/aai/query/builder/GremlinQueryBuilder.java @@ -115,16 +115,18 @@ public abstract class GremlinQueryBuilder<E> extends QueryBuilder<E> { @Override public QueryBuilder<Vertex> getVerticesByBooleanProperty(String key, Object value) { - boolean bValue = false; - - if(value instanceof String){ - bValue = Boolean.valueOf(value.toString()); - } else if(value instanceof Boolean){ - bValue = (Boolean) value; - } - - list.add(HAS + key + "', " + bValue + ")"); - stepIndex++; + + if(value!=null && !"".equals(value)) { + boolean bValue = false; + if(value instanceof String){ + bValue = Boolean.valueOf(value.toString()); + } else if(value instanceof Boolean){ + bValue = (Boolean) value; + } + + list.add(HAS + key + "', " + bValue + ")"); + stepIndex++; + } return (QueryBuilder<Vertex>) this; } |