Package javax.jcr

Examples of javax.jcr.RangeIterator.skip()


        assertEquals(0, iterator.getPosition());
        assertTrue(iterator.hasNext());
        assertEquals("x", iterator.next());

        iterator.skip(1);

        assertEquals(2, iterator.getPosition());
        assertTrue(iterator.hasNext());
        assertEquals("z", iterator.next());
View Full Code Here


      next = (NodeImpl)iterator.next();
      assertEquals(next.getName(), "child0");
      assertEquals(((NodeData)next.getData()).getOrderNumber(), 1);

      iterator.skip(108);
      next = (NodeImpl)iterator.next();
      assertEquals(next.getName(), "child109");
      assertEquals(((NodeData)next.getData()).getOrderNumber(), 110);
   }
View Full Code Here

      // fetch second one (/child1)
      iterator.next();
      assertEquals(2, iterator.getPosition());

      // skip to /child12
      iterator.skip(10);
      NodeImpl next = (NodeImpl)iterator.next();
      assertEquals(13, iterator.getPosition());
      assertEquals(12, next.getProperty(INDEX_PROPERTY).getLong());

      iterator.skip(1);
View Full Code Here

      iterator.skip(10);
      NodeImpl next = (NodeImpl)iterator.next();
      assertEquals(13, iterator.getPosition());
      assertEquals(12, next.getProperty(INDEX_PROPERTY).getLong());

      iterator.skip(1);
      next = (NodeImpl)iterator.next();
      assertEquals(15, iterator.getPosition());
      assertEquals(14, next.getProperty(INDEX_PROPERTY).getLong());

      iterator.skip(100);
View Full Code Here

      iterator.skip(1);
      next = (NodeImpl)iterator.next();
      assertEquals(15, iterator.getPosition());
      assertEquals(14, next.getProperty(INDEX_PROPERTY).getLong());

      iterator.skip(100);
      next = (NodeImpl)iterator.next();
      assertEquals(116, iterator.getPosition());
      assertEquals(115, next.getProperty(INDEX_PROPERTY).getLong());

      iterator = testRoot.getNodesLazily();
View Full Code Here

      assertEquals(116, iterator.getPosition());
      assertEquals(115, next.getProperty(INDEX_PROPERTY).getLong());

      iterator = testRoot.getNodesLazily();
      long size = iterator.getSize();
      iterator.skip(size);

      try
      {
         iterator.next();
         fail("Exception should be thrown");
View Full Code Here

      {
      }

      // remove nodes from 31..60 to make gap in interval of order numbers
      iterator = testRoot.getNodesLazily();
      iterator.skip(30);
      for (int i = 0; i < 30; i++)
      {
         ((NodeImpl)iterator.next()).remove();
      }
      testRoot.save();
View Full Code Here

      next = (NodeImpl)iterator.next();
      assertEquals(next.getName(), "child0");
      assertEquals(((NodeData)next.getData()).getOrderNumber(), 1);

      iterator.skip(108);
      next = (NodeImpl)iterator.next();
      assertEquals(next.getName(), "child109");
      assertEquals(((NodeData)next.getData()).getOrderNumber(), 110);
   }
View Full Code Here

      // fetch second one (/child1)
      iterator.next();
      assertEquals(2, iterator.getPosition());

      // skip to /child12
      iterator.skip(10);
      NodeImpl next = (NodeImpl)iterator.next();
      assertEquals(13, iterator.getPosition());
      assertEquals(12, next.getProperty(INDEX_PROPERTY).getLong());

      iterator.skip(1);
View Full Code Here

      iterator.skip(10);
      NodeImpl next = (NodeImpl)iterator.next();
      assertEquals(13, iterator.getPosition());
      assertEquals(12, next.getProperty(INDEX_PROPERTY).getLong());

      iterator.skip(1);
      next = (NodeImpl)iterator.next();
      assertEquals(15, iterator.getPosition());
      assertEquals(14, next.getProperty(INDEX_PROPERTY).getLong());

      iterator.skip(100);
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.