SpatialIndex Class
- java.
lang. Object - Serializable
- JsonSerializable
- Index
- com.
microsoft. azure. documentdb. SpatialIndex
- com.
public class SpatialIndex extends Index
Represents a spatial index in the Azure Cosmos DB database service.
Constructor Summary
Constructor | Description |
---|---|
SpatialIndex(DataType dataType) |
Initializes a new instance of the SpatialIndex class. Here is an example to instantiate SpatialIndex class passing in the DataType
|
SpatialIndex(JSONObject jsonObject) |
Initializes a new instance of the SpatialIndex class. |
SpatialIndex(String jsonString) |
Initializes a new instance of the SpatialIndex class. |
Method Summary
Modifier and Type | Method and Description |
---|---|
Data |
getDataType()
Gets data type. |
void |
setDataType(DataType dataType)
Sets data type. |
Inherited Members
Constructor Details
SpatialIndex
public SpatialIndex(DataType dataType)
Initializes a new instance of the SpatialIndex class.
Here is an example to instantiate SpatialIndex class passing in the DataType
SpatialIndex spatialIndex = new SpatialIndex(DataType.Point);
</code></pre></p>
Parameters:
dataType
- specifies the target data type for the index path specification.
SpatialIndex
public SpatialIndex(JSONObject jsonObject)
Initializes a new instance of the SpatialIndex class.
Parameters:
jsonObject
- the json object that represents the index.
SpatialIndex
public SpatialIndex(String jsonString)
Initializes a new instance of the SpatialIndex class.
Parameters:
jsonString
- the json string that represents the index.
Method Details
getDataType
public DataType getDataType()
Gets data type.
Returns:
the data type.
setDataType
public void setDataType(DataType dataType)
Sets data type.
Parameters:
dataType
- the data type.
Applies to
Azure SDK for Java