CompositePath Class
- java.
lang. Object - com.
azure. cosmos. models. CompositePath
- com.
public final class CompositePath
Represents a composite path of the IndexingPolicy in the Azure Cosmos DB database service. A composite path is used in a composite index. For example if you want to run a query like "SELECT * FROM c ORDER BY c.age, c.height", then you need to add "/age" and "/height" as composite paths to your composite index.
Constructor Summary
Constructor | Description |
---|---|
CompositePath() |
Constructor. |
Method Summary
Modifier and Type | Method and Description |
---|---|
boolean | equals(Object o) |
Composite |
getOrder()
Gets the sort order for the composite path. |
String |
getPath()
Gets path. |
int | hashCode() |
Composite |
setOrder(CompositePathSortOrder order)
Sets the sort order for the composite path. |
Composite |
setPath(String path)
Sets path. |
Methods inherited from java.lang.Object
Constructor Details
CompositePath
public CompositePath()
Constructor.
Method Details
equals
public boolean equals(Object o)
Overrides:
CompositePath.equals(Object o)Parameters:
getOrder
public CompositePathSortOrder getOrder()
Gets the sort order for the composite path.
For example if you want to run the query "SELECT * FROM c ORDER BY c.age asc, c.height desc", then you need to make the order for "/age" "ascending" and the order for "/height" "descending".
Returns:
getPath
public String getPath()
Gets path.
Returns:
hashCode
public int hashCode()
Overrides:
CompositePath.hashCode()setOrder
public CompositePath setOrder(CompositePathSortOrder order)
Sets the sort order for the composite path.
For example if you want to run the query "SELECT * FROM c ORDER BY c.age asc, c.height desc", then you need to make the order for "/age" "ascending" and the order for "/height" "descending".
Parameters:
Returns:
setPath
public CompositePath setPath(String path)
Sets path.
Parameters:
Returns:
Applies to
Azure SDK for Java