protected DynamicOperand createOrderingOperand() throws RepositoryException { return qf.upperCase(super.createOrderingOperand()); }
public void testUpperLowerCase() throws RepositoryException { // first upper case, then lower case again checkQueries(qf.upperCase(qf.propertyValue("s", propertyName1)), false, QueryObjectModelConstants.JCR_OPERATOR_EQUAL_TO, new String[]{"abc", "Abc", "aBc", "abC", "ABC"}, PropertyType.STRING, new boolean[]{true, false, false, false, false}); }
public void testUpperCaseTwice() throws RepositoryException { // upper case twice checkQueries(qf.upperCase(qf.propertyValue("s", propertyName1)), true, QueryObjectModelConstants.JCR_OPERATOR_EQUAL_TO, new String[]{"abc", "Abc", "aBc", "abC", "ABC"}, PropertyType.STRING, new boolean[]{false, false, false, false, true}); }
/** * Test case for {@link QueryObjectModelFactory#upperCase(DynamicOperand)} */ public void testUpperCase() throws RepositoryException { PropertyValue propValue = qf.propertyValue(SELECTOR_NAME1, propertyName1); UpperCase upper = qf.upperCase(propValue); assertTrue("Not a property value operand", upper.getOperand() instanceof PropertyValue); } }
@Test public void upperCase() throws RepositoryException { PropertyValue p = f.propertyValue("selectorName", "propertyName"); Length length = f.length(p); UpperCase u = f.upperCase(length); assertEquals(length, u.getOperand()); assertEquals("UPPER(LENGTH([selectorName].[propertyName]))", u.toString()); }
private QueryObjectModel createQuery(DynamicOperand operand, boolean toUpper, String operator, Value literal) throws RepositoryException { if (toUpper) { operand = qf.upperCase(operand); } else { operand = qf.lowerCase(operand); } return qf.createQuery( qf.selector(testNodeType, "s"), qf.and( qf.childNode("s", testRoot), qf.comparison( operand, operator, qf.literal(literal) ) ), null, null); } }
op = factory.lowerCase(parseDynamicOperand()); } else if ("UPPER".equalsIgnoreCase(functionName)) { op = factory.upperCase(parseDynamicOperand()); } else { throw getSyntaxError("LENGTH, NAME, LOCALNAME, SCORE, LOWER, UPPER, or CAST");
op = factory.lowerCase(parseDynamicOperand()); } else if ("UPPER".equalsIgnoreCase(functionName)) { op = factory.upperCase(parseDynamicOperand()); } else { throw getSyntaxError("LENGTH, NAME, LOCALNAME, SCORE, LOWER, UPPER, or CAST");
op = factory.lowerCase(parseDynamicOperand()); } else if ("UPPER".equalsIgnoreCase(functionName)) { op = factory.upperCase(parseDynamicOperand()); } else { throw getSyntaxError("LENGTH, NAME, LOCALNAME, SCORE, LOWER, UPPER, or CAST");
operator.comparison( qomFactory, qomFactory.upperCase( qomFactory.propertyValue("s", propertyName1)), qomFactory.literal(