Sdílet prostřednictvím


Resource Class

public class Resource extends JsonSerializable

Represents the base resource in the Azure Cosmos DB database service.

Constructor Summary

Constructor Description
Resource()

Constructor.

Resource(Resource resource)

Copy constructor.

Resource(String jsonString)

Constructor.

Resource(String jsonString, ObjectMapper objectMapper)

Constructor.

Method Summary

Modifier and Type Method and Description
String getETag()

Get the entity tag associated with the resource.

String getId()

Gets the name of the resource.

String getResourceId()

Gets the ID associated with the resource.

String getSelfLink()

Get the self-link associated with the resource.

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.

Inherited Members

Constructor Details

Resource

protected Resource()

Constructor.

Resource

protected Resource(Resource resource)

Copy constructor.

Parameters:

resource - resource to by copied.

Resource

protected Resource(String jsonString)

Constructor.

Parameters:

jsonString - the json string that represents the resource.

Resource

protected Resource(String jsonString, ObjectMapper objectMapper)

Constructor.

Parameters:

jsonString - the json string that represents the resource.
objectMapper - the custom object mapper

Method Details

getETag

public String getETag()

Get the entity tag associated with the resource.

Returns:

the e tag.

getId

public String getId()

Gets the name of the resource.

Returns:

the name of the resource.

getResourceId

public String getResourceId()

Gets the ID associated with the resource.

Returns:

the ID associated with the resource.

getSelfLink

public String getSelfLink()

Get the self-link associated with the resource.

Returns:

the self link.

getTimestamp

public Date getTimestamp()

Get the last modified timestamp associated with the resource.

Returns:

the timestamp.

setId

public void setId(String id)

Sets the name of the resource.

Parameters:

id - the name of the resource.

setResourceId

public void setResourceId(String resourceId)

Set the ID associated with the resource.

Parameters:

resourceId - the ID associated with the resource.

Applies to