@Override public String toUnqualifiedFilter() { return (not ? "NOT" : "") + "(" + filterExpression.toUnqualifiedFilter() + ")"; } }
@Override public String toUnqualifiedFilter() { boolean leftParens = this.left instanceof LogicalExpression; boolean rightParens = this.right instanceof LogicalExpression; String leftString = (leftParens ? "(" : "") + left.toUnqualifiedFilter() + (leftParens ? ")" : ""); String rightString = (rightParens ? "(" : "") + right.toUnqualifiedFilter() + (rightParens ? ")" : ""); return leftString + " " + operator + " " + rightString; } }
@Override public String toFilter() { String filter; if (this.attributeExpression != null) { String subAttributeName = this.attributePath.getSubAttributeName(); String attributeExpressionFilter = this.attributeExpression.toUnqualifiedFilter(); if (subAttributeName != null) { String base = this.attributePath.getAttributeBase(); filter = base + "[" + attributeExpressionFilter + "]." + subAttributeName; } else { String attribute = this.attributePath.getFullyQualifiedAttributeName(); filter = attribute + "[" + attributeExpressionFilter + "]"; } } else { filter = this.attributePath.getFullyQualifiedAttributeName(); } return filter; }
@Override public String toUnqualifiedFilter() { String filter; if (this.attributeExpression != null) { String attributeName = this.attributePath.getAttributeName(); String subAttributeName = this.attributePath.getSubAttributeName(); String attributeExpressionFilter = this.attributeExpression.toUnqualifiedFilter(); if (subAttributeName != null) { filter = attributeName + "[" + attributeExpressionFilter + "]." + subAttributeName; } else { filter = attributeName + "[" + attributeExpressionFilter + "]"; } } else { String subAttributeName = this.attributePath.getSubAttributeName(); filter = this.attributePath.getAttributeName() + (subAttributeName != null ? "." + subAttributeName : ""); } return filter; } }