Package nexj.core.persistence

Examples of nexj.core.persistence.Query.openCursor()


      AssertUtil.assertEquals(getURL("readAssocWhere2.xml"), list, attributes);

      query.setMaxCount(1000000);

      Cursor cursor = query.openCursor();

      try
      {
         int i = 0;
View Full Code Here


      attributes = parse("((: c (* 2 (count (@)))))");
      query = Query.createAggregate(getMetadata().getMetaclass("Contact"), attributes,
         parse("(= classCode \"CON\")"), parse("(addresses)"), null,
         parse("((addresses . #t))"), -1, 0, Query.SEC_NONE, m_context);
      cursor = query.openCursor();

      try
      {
         AssertUtil.assertEquals(getURL("readGroupByCursorCol.xml"), cursor.next(1024), attributes);
      }
View Full Code Here

   public void testConcurrentResultSets()
   {
      Query query = Query.createRead(getMetadata().getMetaclass("Contact"), parse("(firstName)"),
                                     null, null, -1, 0, false, Query.SEC_NONE, m_context);
      Cursor cursor1 = query.openCursor();
      Cursor cursor2 = query.openCursor();

      assertTrue(cursor2.next(-1).size() > 0);
      assertTrue(cursor1.next(-1).size() > 0);
      cursor1.close();
View Full Code Here

   public void testConcurrentResultSets()
   {
      Query query = Query.createRead(getMetadata().getMetaclass("Contact"), parse("(firstName)"),
                                     null, null, -1, 0, false, Query.SEC_NONE, m_context);
      Cursor cursor1 = query.openCursor();
      Cursor cursor2 = query.openCursor();

      assertTrue(cursor2.next(-1).size() > 0);
      assertTrue(cursor1.next(-1).size() > 0);
      cursor1.close();
      cursor2.close();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.