Class FetchOptions.Builder (2.0.0)

public static final class FetchOptions.Builder

Contains static creation methods for FetchOptions.

Inheritance

java.lang.Object > FetchOptions.Builder

Static Methods

withChunkSize(int chunkSize)

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.

Parameter
NameDescription
chunkSizeint

the chunkSize to set.

Returns
TypeDescription
FetchOptions

The newly created FetchOptions instance.

withCursor(Cursor cursor) (deprecated)

public static FetchOptions withCursor(Cursor cursor)

Deprecated. use #withStartCursor instead.

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.

Parameter
NameDescription
cursorCursor

the cursor to set.

Returns
TypeDescription
FetchOptions

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.

Returns
TypeDescription
FetchOptions

withEndCursor(Cursor endCursor)

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.

Parameter
NameDescription
endCursorCursor

the cursor to set.

Returns
TypeDescription
FetchOptions

The newly created FetchOptions instance.

withLimit(int limit)

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.

Parameter
NameDescription
limitint

the limit to set.

Returns
TypeDescription
FetchOptions

The newly created FetchOptions instance.

withOffset(int offset)

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.

Parameter
NameDescription
offsetint

the offset to set.

Returns
TypeDescription
FetchOptions

The newly created FetchOptions instance.

withPrefetchSize(int prefetchSize)

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.

Parameter
NameDescription
prefetchSizeint

the prefetchSize to set.

Returns
TypeDescription
FetchOptions

The newly created FetchOptions instance.

withStartCursor(Cursor startCursor)

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.

Parameter
NameDescription
startCursorCursor

the cursor to set.

Returns
TypeDescription
FetchOptions

The newly created FetchOptions instance.