@Test @FixFor("MODE-2034") public void shouldReorderChildrenWithChanges() throws Exception { Node parent = session.getRootNode().addNode("parent", "nt:unstructured"); try { Node child1 = parent.addNode("child1"); Node child2 = parent.addNode("child2"); session.save(); parent.orderBefore("child2", "child1"); child1.setProperty("prop", "value"); child2.setProperty("prop", "value"); session.save(); NodeIterator nodeIterator = parent.getNodes(); long childIdx = nodeIterator.getSize(); while (nodeIterator.hasNext()) { Node child = nodeIterator.nextNode(); assertEquals("child" + childIdx, child.getName()); childIdx--; } } finally { parent.remove(); session.save(); } }
@Override public String getName() throws RepositoryException { return segment().getName().getString(namespaces()); }
JcrNode extends AbstractJcrNode { @Override public String getName() throws RepositoryException { return segment().getName().getString(namespaces()); } }
JcrNode extends AbstractJcrNode { @Override public String getName() throws RepositoryException { return segment().getName().getString(namespaces()); } JcrNode( JcrSession session,
             NodeKey nodeKey ); }
JcrNode extends AbstractJcrNode { @Override public String getName() throws RepositoryException { return segment().getName().getString(namespaces()); } JcrNode( JcrSession session,
             NodeKey nodeKey ); @Override int getIndex(); @Override String getName(); @Override AbstractJcrNode getParent(); @Override String getPath(); }
JcrNode extends AbstractJcrNode { @Override public String getName() throws RepositoryException { return segment().getName().getString(namespaces()); } JcrNode( JcrSession session,
             NodeKey nodeKey ); @Override int getIndex(); @Override String getName(); @Override AbstractJcrNode getParent(); @Override String getPath();  }