Partager via


CosmosStoredProcedureProperties Class

  • java.lang.Object
    • com.azure.cosmos.models.CosmosStoredProcedureProperties

public final class CosmosStoredProcedureProperties

Represents a stored procedure in the Azure Cosmos DB database service.

Cosmos DB allows stored procedures to be executed in the storage tier, directly against a container. The script gets executed under ACID transactions on the primary storage partition of the specified container. For additional details, refer to documentation

Constructor Summary

Constructor Description
CosmosStoredProcedureProperties(String id, String body)

Constructor.

Method Summary

Modifier and Type Method and Description
String getBody()

Get the body of the stored procedure.

String getETag()

Get the entity tag associated with the resource.

String getId()

Gets the name of the resource.

Instant getTimestamp()

Get the last modified timestamp associated with the resource.

CosmosStoredProcedureProperties setBody(String body)

Set the body of the stored procedure.

CosmosStoredProcedureProperties setId(String id)

Sets the id

Methods inherited from java.lang.Object

Constructor Details

CosmosStoredProcedureProperties

public CosmosStoredProcedureProperties(String id, String body)

Constructor.

Parameters:

id - the id of the stored procedure
body - the body of the stored procedure

Method Details

getBody

public String getBody()

Get the body of the stored procedure.

Returns:

the body of the stored procedure.

getETag

public String getETag()

Get the entity tag associated with the resource. This is only relevant when getting response from the server.

Returns:

the e tag.

getId

public String getId()

Gets the name of the resource.

Returns:

the name of the resource.

getTimestamp

public Instant getTimestamp()

Get the last modified timestamp associated with the resource. This is only relevant when getting response from the server.

Returns:

the timestamp.

setBody

public CosmosStoredProcedureProperties setBody(String body)

Set the body of the stored procedure.

Parameters:

body - the body of the stored procedure.

Returns:

return the Cosmos stored procedure properties.

setId

public CosmosStoredProcedureProperties setId(String id)

Sets the id

Parameters:

id - the name of the resource.

Returns:

return the Cosmos stored procedure properties with id set

Applies to