Create a FetchOptions with the given chunk size. Shorthand for
FetchOptions.withDefaults().chunkSize(...); Please read the FetchOptions class
javadoc for an explanation of how chunk size is used.
Create a FetchOptions with the given cursor. Shorthand for
FetchOptions.withDefaults().cursor(cursor);. Please read the FetchOptions
class javadoc for an explanation of how cursors are used.
Create a FetchOptions with the given end cursor. Shorthand for
FetchOptions.withDefaults().endCursor(cursor);. Please read the FetchOptions
class javadoc for an explanation of how cursors are used.
Create a FetchOptions with the given limit. Shorthand for
FetchOptions.withDefaults().limit(...); Please read the FetchOptions class
javadoc for an explanation of how limit is used.
Create a FetchOptions with the given offset. Shorthand for
FetchOptions.withDefaults().offset(...); Please read the FetchOptions class
javadoc for an explanation of how offset is used.
Create a FetchOptions with the given prefetch size. Shorthand for
FetchOptions.withDefaults().prefetchSize(...);. Please read the FetchOptions
class javadoc for an explanation of how prefetch size is used.
Create a FetchOptions with the given start cursor. Shorthand for
FetchOptions.withDefaults().startCursor(cursor);. Please read the FetchOptions
class javadoc for an explanation of how cursors are used.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003e\u003ccode\u003eFetchOptions.Builder\u003c/code\u003e provides static methods for creating \u003ccode\u003eFetchOptions\u003c/code\u003e instances, which are used for controlling data fetching behavior.\u003c/p\u003e\n"],["\u003cp\u003eYou can customize \u003ccode\u003eFetchOptions\u003c/code\u003e with various parameters like \u003ccode\u003echunkSize\u003c/code\u003e, \u003ccode\u003elimit\u003c/code\u003e, \u003ccode\u003eoffset\u003c/code\u003e, \u003ccode\u003eprefetchSize\u003c/code\u003e, and both start and end cursors for navigating through data.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ewithDefaults()\u003c/code\u003e method creates a \u003ccode\u003eFetchOptions\u003c/code\u003e instance with all values set to \u003ccode\u003enull\u003c/code\u003e, serving as a starting point for further customization.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ewithCursor(Cursor cursor)\u003c/code\u003e method is deprecated and you should use \u003ccode\u003ewithStartCursor(Cursor startCursor)\u003c/code\u003e instead.\u003c/p\u003e\n"],["\u003cp\u003eEach of the creation methods returns a newly created FetchOptions instance, allowing you to use the various creation parameters available.\u003c/p\u003e\n"]]],[],null,["# Class FetchOptions.Builder (2.0.0)\n\n public static final class FetchOptions.Builder\n\nContains static creation methods for [FetchOptions](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.FetchOptions). \n\nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e FetchOptions.Builder \n\nInherited Members\n-----------------\n\n[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)\n\nStatic Methods\n--------------\n\n### withChunkSize(int chunkSize)\n\n public static FetchOptions withChunkSize(int chunkSize)\n\nCreate a [FetchOptions](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.FetchOptions) with the given chunk size. Shorthand for `\nFetchOptions.withDefaults().chunkSize(...);` Please read the [FetchOptions](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.FetchOptions) class\njavadoc for an explanation of how chunk size is used.\n\n### withCursor(Cursor cursor) (deprecated)\n\n public static FetchOptions withCursor(Cursor cursor)\n\n**Deprecated.** *use [#withStartCursor](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.FetchOptions.Builder#com_google_appengine_api_datastore_FetchOptions_Builder_withStartCursor_) instead.*\n\nCreate a [FetchOptions](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.FetchOptions) with the given cursor. Shorthand for `\nFetchOptions.withDefaults().cursor(cursor);`. Please read the [FetchOptions](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.FetchOptions)\nclass javadoc for an explanation of how cursors are used.\n\n### withDefaults()\n\n public static FetchOptions withDefaults()\n\nHelper method for creating a [FetchOptions](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.FetchOptions) instance with default values. The defaults\nare `null` for all values.\n\n### withEndCursor(Cursor endCursor)\n\n public static FetchOptions withEndCursor(Cursor endCursor)\n\nCreate a [FetchOptions](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.FetchOptions) with the given end cursor. Shorthand for `\nFetchOptions.withDefaults().endCursor(cursor);`. Please read the [FetchOptions](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.FetchOptions)\nclass javadoc for an explanation of how cursors are used.\n\n### withLimit(int limit)\n\n public static FetchOptions withLimit(int limit)\n\nCreate a [FetchOptions](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.FetchOptions) with the given limit. Shorthand for `\nFetchOptions.withDefaults().limit(...);` Please read the [FetchOptions](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.FetchOptions) class\njavadoc for an explanation of how limit is used.\n\n### withOffset(int offset)\n\n public static FetchOptions withOffset(int offset)\n\nCreate a [FetchOptions](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.FetchOptions) with the given offset. Shorthand for `\nFetchOptions.withDefaults().offset(...);` Please read the [FetchOptions](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.FetchOptions) class\njavadoc for an explanation of how offset is used.\n\n### withPrefetchSize(int prefetchSize)\n\n public static FetchOptions withPrefetchSize(int prefetchSize)\n\nCreate a [FetchOptions](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.FetchOptions) with the given prefetch size. Shorthand for `\nFetchOptions.withDefaults().prefetchSize(...);`. Please read the [FetchOptions](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.FetchOptions)\nclass javadoc for an explanation of how prefetch size is used.\n\n### withStartCursor(Cursor startCursor)\n\n public static FetchOptions withStartCursor(Cursor startCursor)\n\nCreate a [FetchOptions](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.FetchOptions) with the given start cursor. Shorthand for `\nFetchOptions.withDefaults().startCursor(cursor);`. Please read the [FetchOptions](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.datastore.FetchOptions)\nclass javadoc for an explanation of how cursors are used."]]