你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

SpatialIndex Class

public final 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.

SpatialIndex(String jsonString)

Initializes a new instance of the SpatialIndex class.

SpatialIndex(JSONObject jsonObject)

Initializes a new instance of the SpatialIndex class.

Method Summary

Modifier and Type Method and Description
DataType getDataType()

Gets data type.

void setDataType(DataType dataType)

Sets data type.

Methods inherited from Index

Methods inherited from JsonSerializable

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

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);

Parameters:

dataType - specifies the target data type for the index path specification.

SpatialIndex

public SpatialIndex(String jsonString)

Initializes a new instance of the SpatialIndex class.

Parameters:

jsonString - the json string that represents the index.

SpatialIndex

public SpatialIndex(JSONObject jsonObject)

Initializes a new instance of the SpatialIndex class.

Parameters:

jsonObject - the json object 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