Author: tolusha
Date: 2011-09-28 02:59:57 -0400 (Wed, 28 Sep 2011)
New Revision: 4989
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/core/ExtendedNode.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java
Log:
EXOJCR-1498: Migration tool and guideline for migration from 1.12.10-GA to
1.14.0.CR4-CP01
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/core/ExtendedNode.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/core/ExtendedNode.java 2011-09-28
06:34:03 UTC (rev 4988)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/core/ExtendedNode.java 2011-09-28
06:59:57 UTC (rev 4989)
@@ -130,4 +130,17 @@
* @throws RepositoryException If an error occurs.
*/
public NodeIterator getNodesLazily() throws RepositoryException;
+
+ /**
+ * Returns a <code>NodeIterator</code> over all child
<code>Node</code>s of
+ * this <code>Node</code>. Does <i>not</i> include properties
of this
+ * <code>Node</code>. If this node has no child nodes, then an empty
iterator is returned.
+ *
+ * @param pageSize
+ * the amount of the nodes which can be retrieved from the storage per
request
+ * @return A <code>NodeIterator</code> over all child
<code>Node</code>s of
+ * this <code>Node</code>.
+ * @throws RepositoryException If an error occurs.
+ */
+ public NodeIterator getNodesLazily(int pageSize) throws RepositoryException;
}
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java 2011-09-28
06:34:03 UTC (rev 4988)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/NodeImpl.java 2011-09-28
06:59:57 UTC (rev 4989)
@@ -1113,6 +1113,15 @@
/**
* {@inheritDoc}
*/
+ public NodeIterator getNodesLazily(int pageSize) throws RepositoryException
+ {
+ checkValid();
+ return new LazyNodeIteratorByPage(dataManager, pageSize);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public NodeIterator getNodes(String namePattern) throws RepositoryException
{
@@ -3495,7 +3504,7 @@
{
private final SessionDataManager dataManager;
- private int limit = session.getLazyNodeIteratorPageSize();
+ private final int limit;
private int fromOrderNum = 0;
@@ -3509,7 +3518,13 @@
LazyNodeIteratorByPage(SessionDataManager dataManager) throws RepositoryException
{
+ this(dataManager, session.getLazyNodeIteratorPageSize());
+ }
+
+ LazyNodeIteratorByPage(SessionDataManager dataManager, int limit) throws
RepositoryException
+ {
this.dataManager = dataManager;
+ this.limit = limit;
}
/**
Show replies by date