Notice: Over the next few months, we're reorganizing the App Engine documentation site to make it easier to find content and better align with the rest of Google Cloud products. The same content will be available, but the navigation will now match the rest of the Cloud products. If you have feedback or questions as you navigate the site, click Send Feedback.

FetchOptions.Builder (Google App Engine API for Java)

Stay organized with collections Save and categorize content based on your preferences.
com.google.appengine.api.datastore

Class FetchOptions.Builder

  • java.lang.Object
    • com.google.appengine.api.datastore.FetchOptions.Builder
  • Enclosing class:
    FetchOptions


    public static final class FetchOptions.Builder
    extends java.lang.Object
    Contains static creation methods for FetchOptions.
    • Method Detail

      • withLimit

        public static FetchOptions withLimit(int limit)
        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.
        Parameters:
        limit - the limit to set.
        Returns:
        The newly created FetchOptions instance.
      • withOffset

        public static FetchOptions withOffset(int offset)
        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.
        Parameters:
        offset - the offset to set.
        Returns:
        The newly created FetchOptions instance.
      • withChunkSize

        public static FetchOptions withChunkSize(int chunkSize)
        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.
        Parameters:
        chunkSize - the chunkSize to set.
        Returns:
        The newly created FetchOptions instance.
      • withPrefetchSize

        public static FetchOptions withPrefetchSize(int prefetchSize)
        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.
        Parameters:
        prefetchSize - the prefetchSize to set.
        Returns:
        The newly created FetchOptions instance.
      • withStartCursor

        public static FetchOptions withStartCursor(Cursor startCursor)
        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.
        Parameters:
        startCursor - the cursor to set.
        Returns:
        The newly created FetchOptions instance.
      • withEndCursor

        public static FetchOptions withEndCursor(Cursor endCursor)
        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.
        Parameters:
        endCursor - the cursor to set.
        Returns:
        The newly created FetchOptions instance.
      • withDefaults

        public static FetchOptions withDefaults()
        Helper method for creating a FetchOptions instance with default values. The defaults are null for all values.