public static final class FetchOptions.Builder
Contains static creation methods for FetchOptions.
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 | |
---|---|
Name | Description |
chunkSize |
int the chunkSize to set. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
cursor |
Cursor the cursor to set. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
endCursor |
Cursor the cursor to set. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
limit |
int the limit to set. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
offset |
int the offset to set. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
prefetchSize |
int the prefetchSize to set. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
startCursor |
Cursor the cursor to set. |
Returns | |
---|---|
Type | Description |
FetchOptions |
The newly created FetchOptions instance. |