RangeIndex Class
- java.
lang. Object - com.
microsoft. azure. documentdb. JsonSerializable - com.
microsoft. azure. documentdb. Index - com.
microsoft. azure. documentdb. RangeIndex
- com.
- com.
- com.
public final class RangeIndex
extends Index
Represents a range index in the Azure Cosmos DB database service.
Constructor Summary
Constructor | Description |
---|---|
RangeIndex(DataType dataType) |
Initializes a new instance of the Range |
RangeIndex(DataType dataType, int precision) |
Initializes a new instance of the Range |
RangeIndex(String jsonString) |
Initializes a new instance of the Range |
RangeIndex(JSONObject jsonObject) |
Initializes a new instance of the Range |
Method Summary
Modifier and Type | Method and Description |
---|---|
Data |
getDataType()
Gets data type. |
int |
getPrecision()
Gets precision. |
void |
setDataType(DataType dataType)
Sets data type. |
void |
setPrecision(int precision)
Sets precision. |
Methods inherited from Index
Methods inherited from JsonSerializable
Methods inherited from java.lang.Object
Constructor Details
RangeIndex
public RangeIndex(DataType dataType)
Initializes a new instance of the RangeIndex class with specified DataType.
Here is an example to instantiate RangeIndex class passing in the DataType:
RangeIndex rangeIndex = new RangeIndex(DataType.Number);
Parameters:
RangeIndex
public RangeIndex(DataType dataType, int precision)
Initializes a new instance of the RangeIndex class with specified DataType and precision.
RangeIndex rangeIndex = new RangeIndex(DataType.Number, -1);
Parameters:
RangeIndex
public RangeIndex(String jsonString)
Initializes a new instance of the RangeIndex class with json string.
Parameters:
RangeIndex
public RangeIndex(JSONObject jsonObject)
Initializes a new instance of the RangeIndex class with json object.
Parameters:
Method Details
getDataType
public DataType getDataType()
Gets data type.
Returns:
getPrecision
public int getPrecision()
Gets precision.
Returns:
setDataType
public void setDataType(DataType dataType)
Sets data type.
Parameters:
setPrecision
public void setPrecision(int precision)
Sets precision.
Parameters:
Applies to
Azure SDK for Java