cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amania...@apache.org
Subject svn commit: r937804 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/SelectQuery.java
Date Sun, 25 Apr 2010 14:14:12 GMT
Author: amaniatis
Date: Sun Apr 25 14:14:12 2010
New Revision: 937804

URL: http://svn.apache.org/viewvc?rev=937804&view=rev
Log:
Slight improvements to the documentation of pagination.

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/SelectQuery.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/SelectQuery.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/SelectQuery.java?rev=937804&r1=937803&r2=937804&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/SelectQuery.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/query/SelectQuery.java
Sun Apr 25 14:14:12 2010
@@ -521,9 +521,7 @@ public class SelectQuery extends Qualifi
     }
 
     /**
-     * Returns <code>pageSize</code> property. Page size is a hint telling Cayenne
-     * QueryEngine that query result should use paging instead of reading the whole result
-     * in the memory.
+     * Returns <code>pageSize</code> property. See setPageSize for more details.
      */
     public int getPageSize() {
         return metaData.getPageSize();
@@ -532,6 +530,14 @@ public class SelectQuery extends Qualifi
     /**
      * Sets <code>pageSize</code> property.
      * 
+     * By setting a page size, the Collection returned by performing a query will return
+     * <i>hollow</i> DataObjects. This is considerably faster and uses a tiny
fraction of the memory
+     * compared to a non-paged query when large numbers of objects are returned in the result.
+     * When a hollow DataObject is accessed all DataObjects on the same page will be faulted
into
+     * memory. There will be a small delay when faulting objects while the data is fetched
+     * from the data source, but otherwise you do not need to do anything special to access
data
+     * in hollow objects. The first page is always faulted into memory immediately.
+     * 
      * @param pageSize The pageSize to set
      */
     public void setPageSize(int pageSize) {



Mime
View raw message