你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
HashIndex Class
- java.
lang. Object - com.
microsoft. azure. documentdb. JsonSerializable - com.
microsoft. azure. documentdb. Index - com.
microsoft. azure. documentdb. HashIndex
- com.
- com.
- com.
public final class HashIndex
extends Index
Represents a hash index in the Azure Cosmos DB database service.
Constructor Summary
Constructor | Description |
---|---|
HashIndex(DataType dataType) |
Specifies an instance of Hash |
HashIndex(DataType dataType, int precision) |
Initializes a new instance of the Hash |
HashIndex(String jsonString) |
Initializes a new instance of the Hash |
HashIndex(JSONObject jsonObject) |
Initializes a new instance of the Hash |
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
HashIndex
public HashIndex(DataType dataType)
Specifies an instance of HashIndex class with specified DataType.
Here is an example to instantiate HashIndex class passing in the DataType:
HashIndex hashIndex = new HashIndex(DataType.String);
Parameters:
HashIndex
public HashIndex(DataType dataType, int precision)
Initializes a new instance of the HashIndex class with specified DataType and precision.
Here is an example to instantiate HashIndex class passing in the DataType:
HashIndex hashIndex = new HashIndex(DataType.String, 3);
Parameters:
HashIndex
public HashIndex(String jsonString)
Initializes a new instance of the HashIndex class with json string.
Parameters:
HashIndex
public HashIndex(JSONObject jsonObject)
Initializes a new instance of the HashIndex 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: