Package io.stargate.sdk.doc.domain
Class PageableQueryBuilder
java.lang.Object
io.stargate.sdk.doc.domain.PageableQueryBuilder
Builder for the pageable query.
- Author:
- Cedrick LUNVEN (@clunven)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionOnly return those fields if providedbuild()Terminal call to build immutable instance ofPageableQuery.intGetter accessor for attribute 'pageSize'.Getter accessor for attribute 'pageState'.Build Where Clause based on Filters.Use 'where' to help you createpageSize(int pageSize) Enable paging.withPageStateOnly return those fields if providedKeep fields null but convenient for fluent api.Only return those fields if provided
-
Field Details
-
fields
Fields to search. -
whereClause
One can provide the full where clause as a JSON String. If not null it will be used and the filters will be ignored. -
filters
Use to build the where Clause as a JsonString if the field whereClause is not provided. - FieldName + condition + value -
pageSize
protected int pageSizePage size. -
pageState
Page state.
-
-
Constructor Details
-
PageableQueryBuilder
public PageableQueryBuilder()Default constructor.
-
-
Method Details
-
pageSize
Enable paging.- Parameters:
pageSize- page size- Returns:
- self reference
-
pageState
withPageState- Parameters:
pageState- String- Returns:
- DocumentPageQueryBuilder
-
select
Only return those fields if provided- Parameters:
fields- String- Returns:
- SearchDocumentQueryBuilder
-
selectAll
Keep fields null but convenient for fluent api.- Returns:
- current query
-
jsonWhere
Use 'where' to help you create- Parameters:
where- String- Returns:
- SearchDocumentQueryBuilder
-
where
Only return those fields if provided- Parameters:
fieldName- String- Returns:
- SearchDocumentWhere
-
and
Only return those fields if provided- Parameters:
fieldName- String- Returns:
- SearchDocumentWhere
-
getWhereClause
Build Where Clause based on Filters.- Returns:
- String
-
build
Terminal call to build immutable instance ofPageableQuery.- Returns:
- immutable instance of
PageableQuery.
-
getPageSize
public int getPageSize()Getter accessor for attribute 'pageSize'.- Returns:
- current value of 'pageSize'
-
getPageState
Getter accessor for attribute 'pageState'.- Returns:
- current value of 'pageState'
-