You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@shindig.apache.org by zh...@apache.org on 2010/05/15 17:58:06 UTC

svn commit: r944672 - /shindig/trunk/java/common/src/main/java/org/apache/shindig/protocol/RestfulCollection.java

Author: zhoresh
Date: Sat May 15 15:58:06 2010
New Revision: 944672

URL: http://svn.apache.org/viewvc?rev=944672&view=rev
Log:
Add back depracated constructor http://codereview.appspot.com/1199044/show

Modified:
    shindig/trunk/java/common/src/main/java/org/apache/shindig/protocol/RestfulCollection.java

Modified: shindig/trunk/java/common/src/main/java/org/apache/shindig/protocol/RestfulCollection.java
URL: http://svn.apache.org/viewvc/shindig/trunk/java/common/src/main/java/org/apache/shindig/protocol/RestfulCollection.java?rev=944672&r1=944671&r2=944672&view=diff
==============================================================================
--- shindig/trunk/java/common/src/main/java/org/apache/shindig/protocol/RestfulCollection.java (original)
+++ shindig/trunk/java/common/src/main/java/org/apache/shindig/protocol/RestfulCollection.java Sat May 15 15:58:06 2010
@@ -60,6 +60,14 @@ public class RestfulCollection<T> {
     this.itemsPerPage = Math.min(itemsPerPage, totalResults);
   }
 
+  /**
+   * Helper constructor for un-paged collection, 
+   * Use {@link #RestfulCollection(java.util.List, int, int, int)} in paginated context
+   */
+  public RestfulCollection(List<T> entry, int startIndex, int totalResults) {
+    this(entry, startIndex, totalResults, entry.size());
+  }
+  
   public List<T> getEntry() {
     return entry;
   }