Sdílet prostřednictvím


Trigger Class

public class Trigger extends Resource

Represents a trigger in the Azure Cosmos DB database service.

Cosmos DB supports pre and post triggers defined in JavaScript to be executed on creates, updates and deletes. For additional details, refer to the server-side JavaScript API documentation.

Constructor Summary

Constructor Description
Trigger()

Constructor.

Trigger(String jsonString)

Constructor.

Method Summary

Modifier and Type Method and Description
String getBody()

Get the body of the trigger.

TriggerOperation getTriggerOperation()

Get the operation type of the trigger.

TriggerType getTriggerType()

Get the type of the trigger.

void setBody(String body)

Set the body of the trigger.

void setTriggerOperation(TriggerOperation triggerOperation)

Set the operation type of the trigger.

void setTriggerType(TriggerType triggerType)

Set the type of the resource.

Inherited Members

Constructor Details

Trigger

public Trigger()

Constructor.

Trigger

public Trigger(String jsonString)

Constructor.

Parameters:

jsonString - the json string that represents the trigger.

Method Details

getBody

public String getBody()

Get the body of the trigger.

Returns:

the body of the trigger.

getTriggerOperation

public TriggerOperation getTriggerOperation()

Get the operation type of the trigger.

Returns:

the trigger operation.

getTriggerType

public TriggerType getTriggerType()

Get the type of the trigger.

Returns:

the trigger type.

setBody

public void setBody(String body)

Set the body of the trigger.

Parameters:

body - the body of the trigger.

setTriggerOperation

public void setTriggerOperation(TriggerOperation triggerOperation)

Set the operation type of the trigger.

Parameters:

triggerOperation - the trigger operation.

setTriggerType

public void setTriggerType(TriggerType triggerType)

Set the type of the resource.

Parameters:

triggerType - the trigger type.

Applies to