org.apache.jackrabbit.test.api.query
Class OrderByLongTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.apache.jackrabbit.test.JUnitTest
              extended byorg.apache.jackrabbit.test.AbstractJCRTest
                  extended byorg.apache.jackrabbit.test.api.query.AbstractQueryTest
                      extended byorg.apache.jackrabbit.test.api.query.AbstractOrderByTest
                          extended byorg.apache.jackrabbit.test.api.query.OrderByLongTest
All Implemented Interfaces:
junit.framework.Test

public class OrderByLongTest
extends org.apache.jackrabbit.test.api.query.AbstractOrderByTest

Test cases for order by queries on long properties.


Field Summary
protected  boolean checkSQL
          If true this repository supports sql queries
 
Fields inherited from class org.apache.jackrabbit.test.api.query.AbstractQueryTest
jcrContains, jcrDeref, jcrPath, jcrRoot, jcrScore
 
Fields inherited from class org.apache.jackrabbit.test.AbstractJCRTest
helper, isReadOnly, jcrBaseVersion, jcrCreated, jcrFrozenNode, jcrlockIsDeep, jcrLockOwner, jcrMergeFailed, jcrMixinTypes, jcrPredecessors, jcrPrimaryType, jcrRootVersion, jcrSuccessors, jcrSystem, jcrUUID, jcrVersionHistory, mixLockable, mixReferenceable, mixVersionable, nodeName1, nodeName2, nodeName3, nodeName4, NS_JCR_URI, NS_MIX_URI, NS_NT_URI, NS_SV_URI, ntBase, ntFrozenNode, ntQuery, ntVersion, ntVersionHistory, ntVersionLabels, propertyName1, propertyName2, superuser, testNodeType, testPath, testRoot, testRootNode, workspaceName
 
Fields inherited from class org.apache.jackrabbit.test.JUnitTest
log
 
Constructor Summary
OrderByLongTest()
           
 
Method Summary
protected  void checkOrder(java.lang.String[] nodeNames)
          Runs queries on the workspace and checks if the ordering is according to the nodeNames.
protected  void checkResultOrder(javax.jcr.query.QueryResult result, java.lang.String[] nodeNames)
          Checks if the node ordering in result is according to nodeNames.
protected  void populate(java.util.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(java.lang.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 setUp()
          Set-up the configuration values used for the test.
 void testIntegerOrder()
          Tests order by queries with long properties.
 
Methods inherited from class org.apache.jackrabbit.test.api.query.AbstractQueryTest
checkResult, checkResult, checkResult, createQuery, createQuery, evaluateResultOrder, execute, execute, executeSqlQuery, executeXPathQuery, hasDescriptor, toArray
 
Methods inherited from class org.apache.jackrabbit.test.AbstractJCRTest
createRandomString, getNonExistingWorkspaceName, getProperty, getSize, run, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
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, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

checkSQL

protected boolean checkSQL
If true this repository supports sql queries

Constructor Detail

OrderByLongTest

public OrderByLongTest()
Method Detail

testIntegerOrder

public void testIntegerOrder()
                      throws java.lang.Exception
Tests order by queries with long properties.

Throws:
java.lang.Exception

setUp

protected void setUp()
              throws java.lang.Exception
Description copied from class: AbstractQueryTest
Set-up the configuration values used for the test. Per default retrieves a session, configures testRoot, and nodetype and checks if the query language for the current language is available.

Overrides:
setUp in class AbstractQueryTest
Throws:
java.lang.Exception

populate

protected void populate(java.lang.String[] values)
                 throws javax.jcr.RepositoryException
Populates the workspace with child nodes under testroot with each node has a String value set in property with name propertyname1.

Parameters:
values - the String values.
Throws:
javax.jcr.RepositoryException

populate

protected void populate(java.util.Calendar[] values)
                 throws javax.jcr.RepositoryException
Populates the workspace with child nodes under testroot with each node has a calendar value set in property with name propertyname1.

Parameters:
values - the calendar values.
Throws:
javax.jcr.RepositoryException

populate

protected void populate(long[] values)
                 throws javax.jcr.RepositoryException
Populates the workspace with child nodes under testroot with each node has a long value set in property with name propertyname1.

Parameters:
values - the long values.
Throws:
javax.jcr.RepositoryException

populate

protected void populate(double[] values)
                 throws javax.jcr.RepositoryException
Populates the workspace with child nodes under testroot with each node has a double value set in property with name propertyname1.

Parameters:
values - the double values.
Throws:
javax.jcr.RepositoryException

checkOrder

protected void checkOrder(java.lang.String[] nodeNames)
                   throws javax.jcr.RepositoryException
Runs queries on the workspace and checks if the ordering is according to the nodeNames.

Parameters:
nodeNames - the sequence of node names required in the result set.
Throws:
javax.jcr.RepositoryException

checkResultOrder

protected void checkResultOrder(javax.jcr.query.QueryResult result,
                                java.lang.String[] nodeNames)
                         throws javax.jcr.RepositoryException
Checks if the node ordering in result is according to nodeNames.

Parameters:
result - the query result.
nodeNames - the node names.
Throws:
javax.jcr.RepositoryException


Copyright © -2005 . All Rights Reserved.