解决方法
这个怎么样:
List<Employee> results = (List<Employee>) query.execute(); // Use the first 20 results... Cursor cursor = JPACursorHelper.getCursor(results); String cursorString = cursor.toWebSafeString(); // Store the cursorString... // ... // Query query = the same query that produced the cursor // String cursorString = the string from storage Cursor cursor = Cursor.fromWebSafeString(cursorString); query.setHint(JPACursorHelper.CURSOR_HINT,cursor); query.setRange(0,20); List<Employee> results = (List<Employee>) query.execute(); // Use the next 20 results...
从:@H_301_3@
How to use datastore cursors with jpa on GAE@H_301_3@
也:@H_301_3@
http://groups.google.com/group/google-appengine-java/browse_thread/thread/5223215ff24c3b3e/d22297d1d76a9c8b@H_301_3@
或者没有JPA,请参阅:@H_301_3@
http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/Cursor.html@H_301_3@