Search in sources :

Example 6 with BindVariableValue

use of javax.jcr.query.qom.BindVariableValue in project jackrabbit by apache.

the class QueryObjectModelFactoryTest method testBindVariableValue.

/**
     * Test case for {@link QueryObjectModelFactory#bindVariable(String)}
     */
public void testBindVariableValue() throws RepositoryException {
    BindVariableValue bindVar = qf.bindVariable(propertyName1);
    assertEquals("Wrong variable name", propertyName1, bindVar.getBindVariableName());
}
Also used : BindVariableValue(javax.jcr.query.qom.BindVariableValue)

Example 7 with BindVariableValue

use of javax.jcr.query.qom.BindVariableValue in project jackrabbit-oak by apache.

the class QomTest method bindVariable.

@Test
public void bindVariable() throws RepositoryException {
    BindVariableValue b = f.bindVariable("bindVariableName");
    assertEquals("bindVariableName", b.getBindVariableName());
    assertEquals("$bindVariableName", b.toString());
}
Also used : BindVariableValue(javax.jcr.query.qom.BindVariableValue) Test(org.junit.Test) AbstractRepositoryTest(org.apache.jackrabbit.oak.jcr.AbstractRepositoryTest)

Aggregations

BindVariableValue (javax.jcr.query.qom.BindVariableValue)7 PropertyValue (javax.jcr.query.qom.PropertyValue)3 Column (javax.jcr.query.qom.Column)2 Constraint (javax.jcr.query.qom.Constraint)2 Ordering (javax.jcr.query.qom.Ordering)2 Selector (javax.jcr.query.qom.Selector)2 StaticOperand (javax.jcr.query.qom.StaticOperand)2 AbstractRepositoryTest (org.apache.jackrabbit.oak.jcr.AbstractRepositoryTest)2 Test (org.junit.Test)2 Value (javax.jcr.Value)1 Comparison (javax.jcr.query.qom.Comparison)1 FullTextSearch (javax.jcr.query.qom.FullTextSearch)1 Literal (javax.jcr.query.qom.Literal)1 QueryObjectModel (javax.jcr.query.qom.QueryObjectModel)1 Source (javax.jcr.query.qom.Source)1