CosmosQuery Class
- java.
lang. Object - com.
azure. spring. data. cosmos. core. query. CosmosQuery
- com.
public class CosmosQuery
Class for cosmos query
Constructor Summary
Constructor | Description |
---|---|
CosmosQuery(Criteria criteria) |
Initialization |
Method Summary
Modifier and Type | Method and Description |
---|---|
Optional<Object> |
getPartitionKeyValue(Class<T> domainType)
Returns partition key value based on the criteria. |
Criteria |
getCriteria()
To get Criteria object |
Optional<Criteria> |
getCriteriaByType(CriteriaType criteriaType)
To get criteria by type |
int |
getLimit()
To get limit number |
long |
getOffset()
To get offset number |
org.springframework.data.domain.Pageable |
getPageable()
To get Pageable object |
org.springframework.data.domain.Sort |
getSort()
To get Sort object |
boolean |
hasPartitionKeyCriteria(String partitionKeyFieldName)
Returns true if this criteria or sub-criteria has partition key field present as one of the subjects. |
boolean |
isCrossPartitionQuery(List<String> partitionKeys)
Indicate if Document |
void |
setLimit(int limit)
Deprecated
use with
To set limit number |
Cosmos |
with(Pageable pageable)
With Sort |
Cosmos |
with(Sort sort)
With Sort |
Cosmos |
withLimit(int limit)
To set limit number |
Cosmos |
withOffsetAndLimit(long offset, int limit)
To set limit number and offset number |
Methods inherited from java.lang.Object
Constructor Details
CosmosQuery
public CosmosQuery(Criteria criteria)
Initialization
Parameters:
Method Details
getPartitionKeyValue
public Optional
Azure SDK for Java