public class OrderByStringTest extends AbstractQueryTest
testroot
path to node that accepts child nodes of type
nodetype
nodetype
name of a node type
nodename1
name of a child node of type nodetype
nodename2
name of a child node of type nodetype
nodename3
name of a child node of type nodetype
nodename4
name of a child node of type nodetype
propertyname1
name of a single value String property.
Modifier and Type | Field and Description |
---|---|
protected boolean |
checkSQL
If
true this repository supports sql queries |
jcrContains, jcrDeref, jcrPath, jcrRoot, jcrScore, qf, qm, qsSQL, qsXPATH, vf, xpathRoot
isReadOnly, jcrBaseVersion, jcrCopiedFrom, jcrCreated, jcrFrozenNode, jcrFrozenUuid, jcrIsCheckedOut, jcrlockIsDeep, jcrLockOwner, jcrMergeFailed, jcrMixinTypes, jcrPredecessors, jcrPrimaryType, jcrRootVersion, jcrSuccessors, jcrSystem, jcrUUID, jcrVersionHistory, mixLockable, mixReferenceable, mixShareable, mixSimpleVersionable, mixTitle, mixVersionable, nodeName1, nodeName2, nodeName3, nodeName4, NS_JCR_URI, NS_MIX_URI, NS_NT_URI, NS_SV_URI, ntActivity, ntBase, ntFrozenNode, ntQuery, ntUnstructured, ntVersion, ntVersionHistory, ntVersionLabels, propertyName1, propertyName2, superuser, testNodeType, testNodeTypeNoChildren, testNodeTypeTestRoot, testPath, testRoot, testRootNode, workspaceName
Constructor and Description |
---|
OrderByStringTest() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkOrder(String[] nodeNames)
Runs queries on the workspace and checks if the ordering is according
to the
nodeNames . |
protected void |
checkResultOrder(QueryResult result,
String[] nodeNames)
Checks if the node ordering in
result is according to
nodeNames . |
protected DynamicOperand |
createOrderingOperand() |
protected QueryObjectModel |
createQOM(boolean ascending) |
protected String |
createSQL() |
protected String |
createXPath() |
protected void |
populate(BigDecimal[] values)
Populates the workspace with child nodes under
testroot with
each node has a decimal value set in property with name
propertyname1 . |
protected void |
populate(Calendar[] values)
Populates the workspace with child nodes under
testroot with
each node has a calendar value set in property with name
propertyname1 . |
protected void |
populate(double[] values)
Populates the workspace with child nodes under
testroot with
each node has a double value set in property with name
propertyname1 . |
protected void |
populate(long[] values)
Populates the workspace with child nodes under
testroot with
each node has a long value set in property with name
propertyname1 . |
protected void |
populate(String[] values)
Populates the workspace with child nodes under
testroot with
each node has a String value set in property with name
propertyname1 . |
protected void |
populate(String[] values,
int type)
Populates the workspace with child nodes under
testroot with
each node has a value set in property with name
propertyname1 . |
protected void |
setUp()
Set-up the configuration values used for the test.
|
void |
testStringOrder()
Tests order by queries with String properties.
|
checkResult, checkResult, checkResult, checkResult, createQuery, createQuery, createQuery, escapeIdentifierForSQL, evaluateResultOrder, execute, execute, executeSqlQuery, executeSqlQuery, executeXPathQuery, isSupportedLanguage, tearDown, toArray
checkSupportedOption, cleanUp, cleanUpTestRoot, createRandomString, ensureCanSetProperty, ensureCanSetProperty, ensureCanSetProperty, ensureKnowsNodeType, ensureLockingSupported, ensureMixinType, ensureMultipleWorkspacesSupported, getHelper, getJcrValue, getLocalName, getNonExistingWorkspaceName, getPrefix, getProperty, getProperty, getQualifiedName, getSize, isSupported, needsMixin, run
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, runBare, runTest, setName, toString
public void testStringOrder() throws Exception
Exception
protected void setUp() throws Exception
AbstractQueryTest
setUp
in class AbstractQueryTest
Exception
protected void populate(String[] values) throws RepositoryException
testroot
with
each node has a String value set in property with name
propertyname1
.values
- the String values.RepositoryException
protected void populate(String[] values, int type) throws RepositoryException
testroot
with
each node has a value set in property with name
propertyname1
. The actual value is created by using the
sessions value factory and the given type
.values
- the String values.type
- a JCR property type.RepositoryException
protected void populate(Calendar[] values) throws RepositoryException
testroot
with
each node has a calendar value set in property with name
propertyname1
.values
- the calendar values.RepositoryException
protected void populate(long[] values) throws RepositoryException
testroot
with
each node has a long value set in property with name
propertyname1
.values
- the long values.RepositoryException
protected void populate(double[] values) throws RepositoryException
testroot
with
each node has a double value set in property with name
propertyname1
.values
- the double values.RepositoryException
protected void populate(BigDecimal[] values) throws RepositoryException
testroot
with
each node has a decimal value set in property with name
propertyname1
.values
- the decimal values.RepositoryException
protected void checkOrder(String[] nodeNames) throws RepositoryException
nodeNames
.nodeNames
- the sequence of node names required in the result set.RepositoryException
protected void checkResultOrder(QueryResult result, String[] nodeNames) throws RepositoryException
result
is according to
nodeNames
.result
- the query result.nodeNames
- the node names.RepositoryException
protected QueryObjectModel createQOM(boolean ascending) throws RepositoryException
RepositoryException
- if an error occurs.protected DynamicOperand createOrderingOperand() throws RepositoryException
createQOM(boolean)
.RepositoryException
- if an error occurs.protected String createSQL()
null
if SQL is not supported.protected String createXPath() throws RepositoryException
null
is XPath is not supported.RepositoryException
- if an error occurs.Copyright © 2004–2021 The Apache Software Foundation. All rights reserved.