Class FetchOptions.Builder
- java.lang.Object
-
- com.google.appengine.api.datastore.FetchOptions.Builder
-
- Enclosing class:
- FetchOptions
public static final class FetchOptions.Builder extends Object
Contains static creation methods forFetchOptions.
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static FetchOptionswithChunkSize(int chunkSize)Create aFetchOptionswith the given chunk size.static FetchOptionswithCursor(Cursor cursor)Deprecated.static FetchOptionswithDefaults()Helper method for creating aFetchOptionsinstance with default values.static FetchOptionswithEndCursor(Cursor endCursor)Create aFetchOptionswith the given end cursor.static FetchOptionswithLimit(int limit)Create aFetchOptionswith the given limit.static FetchOptionswithOffset(int offset)Create aFetchOptionswith the given offset.static FetchOptionswithPrefetchSize(int prefetchSize)Create aFetchOptionswith the given prefetch size.static FetchOptionswithStartCursor(Cursor startCursor)Create aFetchOptionswith the given start cursor.
-
-
-
Method Detail
-
withLimit
public static FetchOptions withLimit(int limit)
Create aFetchOptionswith the given limit. Shorthand forFetchOptions.withDefaults().limit(...);Please read theFetchOptionsclass 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 aFetchOptionswith the given offset. Shorthand forFetchOptions.withDefaults().offset(...);Please read theFetchOptionsclass 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 aFetchOptionswith the given chunk size. Shorthand forFetchOptions.withDefaults().chunkSize(...);Please read theFetchOptionsclass 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 aFetchOptionswith the given prefetch size. Shorthand forFetchOptions.withDefaults().prefetchSize(...);. Please read theFetchOptionsclass javadoc for an explanation of how prefetch size is used.- Parameters:
prefetchSize- the prefetchSize to set.- Returns:
- The newly created FetchOptions instance.
-
withCursor
@Deprecated public static FetchOptions withCursor(Cursor cursor)
Deprecated.Create aFetchOptionswith the given cursor. Shorthand forFetchOptions.withDefaults().cursor(cursor);. Please read theFetchOptionsclass javadoc for an explanation of how cursors are used.- Parameters:
cursor- the cursor to set.- Returns:
- The newly created FetchOptions instance.
-
withStartCursor
public static FetchOptions withStartCursor(Cursor startCursor)
Create aFetchOptionswith the given start cursor. Shorthand forFetchOptions.withDefaults().startCursor(cursor);. Please read theFetchOptionsclass 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 aFetchOptionswith the given end cursor. Shorthand forFetchOptions.withDefaults().endCursor(cursor);. Please read theFetchOptionsclass 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 aFetchOptionsinstance with default values. The defaults arenullfor all values.
-
-