public class OrderByDateTest 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 calendar 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, xpathRootisReadOnly, 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 |
|---|
OrderByDateTest() |
| 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 |
testDateOrder()
Tests order by queries with calendar properties.
|
void |
testDateOrderMillis()
Tests order by queries with calendar properties where the calendar
values only have a millisecond difference.
|
void |
testDateOrderNegativeTimeZone()
Tests order by queries with calendar properties where the calendar
values have different time zones.
|
void |
testDateOrderPositiveTimeZone()
Tests order by queries with calendar properties where the calendar
values have different time zones.
|
checkResult, checkResult, checkResult, checkResult, createQuery, createQuery, createQuery, escapeIdentifierForSQL, evaluateResultOrder, execute, execute, executeSqlQuery, executeSqlQuery, executeXPathQuery, isSupportedLanguage, tearDown, toArraycheckSupportedOption, cleanUp, cleanUpTestRoot, createRandomString, ensureCanSetProperty, ensureCanSetProperty, ensureCanSetProperty, ensureKnowsNodeType, ensureLockingSupported, ensureMixinType, ensureMultipleWorkspacesSupported, getHelper, getJcrValue, getLocalName, getNonExistingWorkspaceName, getPrefix, getProperty, getProperty, getQualifiedName, getSize, isSupported, needsMixin, runassertEquals, 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, toStringpublic void testDateOrder()
throws Exception
Exceptionpublic void testDateOrderMillis()
throws Exception
Exceptionpublic void testDateOrderPositiveTimeZone()
throws Exception
Exceptionpublic void testDateOrderNegativeTimeZone()
throws Exception
Exceptionprotected void setUp()
throws Exception
AbstractQueryTestsetUp in class AbstractQueryTestExceptionprotected void populate(String[] values) throws RepositoryException
testroot with
each node has a String value set in property with name
propertyname1.values - the String values.RepositoryExceptionprotected 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.RepositoryExceptionprotected void populate(Calendar[] values) throws RepositoryException
testroot with
each node has a calendar value set in property with name
propertyname1.values - the calendar values.RepositoryExceptionprotected void populate(long[] values)
throws RepositoryException
testroot with
each node has a long value set in property with name
propertyname1.values - the long values.RepositoryExceptionprotected void populate(double[] values)
throws RepositoryException
testroot with
each node has a double value set in property with name
propertyname1.values - the double values.RepositoryExceptionprotected void populate(BigDecimal[] values) throws RepositoryException
testroot with
each node has a decimal value set in property with name
propertyname1.values - the decimal values.RepositoryExceptionprotected void checkOrder(String[] nodeNames) throws RepositoryException
nodeNames.nodeNames - the sequence of node names required in the result set.RepositoryExceptionprotected void checkResultOrder(QueryResult result, String[] nodeNames) throws RepositoryException
result is according to
nodeNames.result - the query result.nodeNames - the node names.RepositoryExceptionprotected 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.