你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Resource Class
- java.
lang. Object - com.
microsoft. azure. documentdb. JsonSerializable - com.
microsoft. azure. documentdb. Resource
- com.
- com.
public class Resource
extends JsonSerializable
Represents the base resource in the Azure Cosmos DB database service.
Constructor Summary
Modifier | Constructor | Description |
---|---|---|
protected | Resource() |
Constructor. |
protected | Resource(String jsonString) |
Constructor. |
protected | Resource(String jsonString, ObjectMapper objectMapper) |
Constructor. |
protected | Resource(JSONObject jsonObject) |
Constructor. |
Method Summary
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getETag()
Get the entity tag associated with the resource. |
java.lang.String |
getId()
Gets the name of the resource. |
java.lang.String |
getResourceId()
Gets the ID associated with the resource. |
java.lang.String |
getSelfLink()
Get the self-link associated with the resource. |
java.util.Date |
getTimestamp()
Get the last modified timestamp associated with the resource. |
void |
setId(String id)
Sets the name of the resource. |
void |
setResourceId(String resourceId)
Set the ID associated with the resource. |
Methods inherited from JsonSerializable
Methods inherited from java.lang.Object
Constructor Details
Resource
protected Resource()
Constructor.
Resource
protected Resource(String jsonString)
Constructor.
Parameters:
Resource
protected Resource(String jsonString, ObjectMapper objectMapper)
Constructor.
Parameters:
Resource
protected Resource(JSONObject jsonObject)
Constructor.
Parameters:
Method Details
getETag
public String getETag()
Get the entity tag associated with the resource.
Returns:
getId
public String getId()
Gets the name of the resource.
Returns:
getResourceId
public String getResourceId()
Gets the ID associated with the resource.
Returns:
getSelfLink
public String getSelfLink()
Get the self-link associated with the resource.
Returns:
getTimestamp
public Date getTimestamp()
Get the last modified timestamp associated with the resource.
Returns:
setId
public void setId(String id)
Sets the name of the resource.
Parameters:
setResourceId
public void setResourceId(String resourceId)
Set the ID associated with the resource.
Parameters: