public Object visit(PropertyFunctionQueryNode node, Object data) { if (node.getFunctionName().equals(PropertyFunctionQueryNode.LOWER_CASE)) { transform[0] = TransformConstants.TRANSFORM_LOWER_CASE; } else if (node.getFunctionName().equals(PropertyFunctionQueryNode.UPPER_CASE)) { transform[0] = TransformConstants.TRANSFORM_UPPER_CASE; } return data; } }, null);
/** * {@inheritDoc} */ public PropertyFunctionQueryNode createPropertyFunctionQueryNode( QueryNode parent, String functionName) { return new PropertyFunctionQueryNode(parent, functionName); }
public Object visit(PropertyFunctionQueryNode node, Object data) { if (node.getFunctionName().equals(PropertyFunctionQueryNode.LOWER_CASE)) { transform[0] = TransformConstants.TRANSFORM_LOWER_CASE; } else if (node.getFunctionName().equals(PropertyFunctionQueryNode.UPPER_CASE)) { transform[0] = TransformConstants.TRANSFORM_UPPER_CASE; } return data; } }, null);
/** * {@inheritDoc} */ public PropertyFunctionQueryNode createPropertyFunctionQueryNode( QueryNode parent, String functionName) { return new PropertyFunctionQueryNode(parent, functionName); }
public Object visit(PropertyFunctionQueryNode node, Object data) { StringBuffer buffer = (StringBuffer) data; buffer.append(PADDING, 0, indent); buffer.append("+ PropertyFunctionQueryNode: "); buffer.append(node.getFunctionName()); buffer.append("()\n"); return buffer; }
public Object visit(PropertyFunctionQueryNode node, Object data) { StringBuffer buffer = (StringBuffer) data; buffer.append(PADDING, 0, indent); buffer.append("+ PropertyFunctionQueryNode: "); buffer.append(node.getFunctionName()); buffer.append("()\n"); return buffer; }
public Object visit(PropertyFunctionQueryNode node, Object data) { StringBuffer sb = (StringBuffer) data; String functionName = node.getFunctionName(); if (functionName.equals(PropertyFunctionQueryNode.LOWER_CASE)) { sb.insert(0, "LOWER(").append(")"); } else if (functionName.equals(PropertyFunctionQueryNode.UPPER_CASE)) { sb.insert(0, "UPPER(").append(")"); } else { exceptions.add(new InvalidQueryException("Unsupported function: " + functionName)); } return sb; }
public Object visit(PropertyFunctionQueryNode node, Object data) { StringBuffer sb = (StringBuffer) data; String functionName = node.getFunctionName(); if (functionName.equals(PropertyFunctionQueryNode.LOWER_CASE)) { sb.insert(0, "LOWER(").append(")"); } else if (functionName.equals(PropertyFunctionQueryNode.UPPER_CASE)) { sb.insert(0, "UPPER(").append(")"); } else { exceptions.add(new InvalidQueryException("Unsupported function: " + functionName)); } return sb; }
public Object visit(PropertyFunctionQueryNode node, Object data) { String functionName = node.getFunctionName(); if ((functionName.equals(PropertyFunctionQueryNode.LOWER_CASE) || functionName.equals(PropertyFunctionQueryNode.UPPER_CASE)) && rqn.getValueType() != QueryConstants.TYPE_STRING) { String msg = "Upper and lower case function are only supported with String literals"; exceptions.add(new InvalidQueryException(msg)); } return data; } }, null);
public Object visit(PropertyFunctionQueryNode node, Object data) { String functionName = node.getFunctionName(); if ((functionName.equals(PropertyFunctionQueryNode.LOWER_CASE) || functionName.equals(PropertyFunctionQueryNode.UPPER_CASE)) && rqn.getValueType() != QueryConstants.TYPE_STRING) { String msg = "Upper and lower case function are only supported with String literals"; exceptions.add(new InvalidQueryException(msg)); } return data; } }, null);
public Object visit(PropertyFunctionQueryNode node, Object data) { StringBuffer sb = (StringBuffer) data; String functionName = node.getFunctionName(); try { if (functionName.equals(PropertyFunctionQueryNode.LOWER_CASE)) { sb.insert(0, resolver.getJCRName(XPathQueryBuilder.FN_LOWER_CASE) + "("); sb.append(")"); } else if (functionName.equals(PropertyFunctionQueryNode.UPPER_CASE)) { sb.insert(0, resolver.getJCRName(XPathQueryBuilder.FN_UPPER_CASE) + "("); sb.append(")"); } else { exceptions.add(new InvalidQueryException("Unsupported function: " + functionName)); } } catch (NamespaceException e) { exceptions.add(e); } return sb; }
public Object visit(PropertyFunctionQueryNode node, Object data) { StringBuffer sb = (StringBuffer) data; String functionName = node.getFunctionName(); try { if (functionName.equals(PropertyFunctionQueryNode.LOWER_CASE)) { sb.insert(0, resolver.getJCRName(XPathQueryBuilder.FN_LOWER_CASE) + "("); sb.append(")"); } else if (functionName.equals(PropertyFunctionQueryNode.UPPER_CASE)) { sb.insert(0, resolver.getJCRName(XPathQueryBuilder.FN_UPPER_CASE) + "("); sb.append(")"); } else { exceptions.add(new InvalidQueryException("Unsupported function: " + functionName)); } } catch (NamespaceException e) { exceptions.add(e); } return sb; }