Class FetchOptions.Builder
java.lang.Object
com.google.appengine.api.datastore.FetchOptions.Builder
- Enclosing class:
FetchOptions
Contains static creation methods for
FetchOptions
.-
Method Summary
Modifier and TypeMethodDescriptionstatic FetchOptions
withChunkSize
(int chunkSize) Create aFetchOptions
with the given chunk size.static FetchOptions
withCursor
(Cursor cursor) Deprecated.static FetchOptions
Helper method for creating aFetchOptions
instance with default values.static FetchOptions
withEndCursor
(Cursor endCursor) Create aFetchOptions
with the given end cursor.static FetchOptions
withLimit
(int limit) Create aFetchOptions
with the given limit.static FetchOptions
withOffset
(int offset) Create aFetchOptions
with the given offset.static FetchOptions
withPrefetchSize
(int prefetchSize) Create aFetchOptions
with the given prefetch size.static FetchOptions
withStartCursor
(Cursor startCursor) Create aFetchOptions
with the given start cursor.
-
Method Details
-
withLimit
Create aFetchOptions
with the given limit. Shorthand forFetchOptions.withDefaults().limit(...);
Please read theFetchOptions
class javadoc for an explanation of how limit is used.- Parameters:
limit
- the limit to set.- Returns:
- The newly created FetchOptions instance.
-
withOffset
Create aFetchOptions
with the given offset. Shorthand forFetchOptions.withDefaults().offset(...);
Please read theFetchOptions
class javadoc for an explanation of how offset is used.- Parameters:
offset
- the offset to set.- Returns:
- The newly created FetchOptions instance.
-
withChunkSize
Create aFetchOptions
with the given chunk size. Shorthand forFetchOptions.withDefaults().chunkSize(...);
Please read theFetchOptions
class javadoc for an explanation of how chunk size is used.- Parameters:
chunkSize
- the chunkSize to set.- Returns:
- The newly created FetchOptions instance.
-
withPrefetchSize
Create aFetchOptions
with the given prefetch size. Shorthand forFetchOptions.withDefaults().prefetchSize(...);
. Please read theFetchOptions
class javadoc for an explanation of how prefetch size is used.- Parameters:
prefetchSize
- the prefetchSize to set.- Returns:
- The newly created FetchOptions instance.
-
withCursor
Deprecated.Create aFetchOptions
with the given cursor. Shorthand forFetchOptions.withDefaults().cursor(cursor);
. Please read theFetchOptions
class javadoc for an explanation of how cursors are used.- Parameters:
cursor
- the cursor to set.- Returns:
- The newly created FetchOptions instance.
-
withStartCursor
Create aFetchOptions
with the given start cursor. Shorthand forFetchOptions.withDefaults().startCursor(cursor);
. Please read theFetchOptions
class javadoc for an explanation of how cursors are used.- Parameters:
startCursor
- the cursor to set.- Returns:
- The newly created FetchOptions instance.
-
withEndCursor
Create aFetchOptions
with the given end cursor. Shorthand forFetchOptions.withDefaults().endCursor(cursor);
. Please read theFetchOptions
class javadoc for an explanation of how cursors are used.- Parameters:
endCursor
- the cursor to set.- Returns:
- The newly created FetchOptions instance.
-
withDefaults
Helper method for creating aFetchOptions
instance with default values. The defaults arenull
for all values.
-
withStartCursor(com.google.appengine.api.datastore.Cursor)
instead.