Package io.stargate.sdk.rest.domain
Class SearchTableQuery.SearchTableQueryBuilder
java.lang.Object
io.stargate.sdk.rest.domain.SearchTableQuery.SearchTableQueryBuilder
- Enclosing class:
SearchTableQuery
Builder pattern.
- Author:
- Cedrick LUNVEN (@clunven)
-
Field Summary
FieldsModifier and TypeFieldDescriptionIf empty the API retrieve all fields SELECT *.Help sorted by result.Use to build the where Clause as a JsonString if the field whereClause is not provided.protected intPage size.protected StringFirst page does not need page state.protected StringOne can provide the full where clause as a JSON String. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Terminal call to build immutable instance ofSearchTableQuery.Build Where Clause based on Filters.Only return those fields if providedOnly return those fields if providedOnly return those fields if providedwithPageSize(int pageSize) withPageSizewithPageState(String pageState) withPageStatewithReturnedFields(String... fields) Only return those fields if providedwithSortedFields(Sort... fields) Only return those fields if providedwithWhereClauseJson(String where) Use 'where" to help you create
-
Field Details
-
pageSize
protected int pageSizePage size. -
pageState
First page does not need page state. -
fieldsToRetrieve
If empty the API retrieve all fields SELECT *. -
fieldsToSort
Help sorted by result. fieldName + ASC/DESC. -
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
-
-
Constructor Details
-
SearchTableQueryBuilder
public SearchTableQueryBuilder()Default constructor.
-
-
Method Details
-
build
Terminal call to build immutable instance ofSearchTableQuery.- Returns:
- immutable instance of
SearchTableQuery.
-
withPageSize
withPageSize- Parameters:
pageSize- int- Returns:
- SearchTableQueryBuilder
-
withPageState
withPageState- Parameters:
pageState- String- Returns:
- SearchTableQueryBuilder
-
withReturnedFields
Only return those fields if provided- Parameters:
fields- String- Returns:
- SearchTableQueryBuilder
-
select
Only return those fields if provided- Parameters:
fields- String- Returns:
- SearchTableQueryBuilder
-
withSortedFields
Only return those fields if provided- Parameters:
fields- SortField- Returns:
- SearchTableQueryBuilder
-
sortBy
Only return those fields if provided- Parameters:
fields- SortField- Returns:
- SearchTableQueryBuilder
-
withWhereClauseJson
Use 'where" to help you create- Parameters:
where- String- Returns:
- SearchTableQueryBuilder
-
where
Only return those fields if provided- Parameters:
fieldName- String- Returns:
- SearchTableWhere
-
getWhereClause
Build Where Clause based on Filters.- Returns:
- String
-