Trigger Class
- java.
lang. Object - com.
microsoft. azure. documentdb. JsonSerializable - com.
microsoft. azure. documentdb. Resource - com.
microsoft. azure. documentdb. Trigger
- com.
- com.
- com.
public class Trigger
extends Resource
Represents a trigger in the Azure Cosmos DB database service.
Azure 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. |
Trigger(JSONObject jsonObject) |
Constructor. |
Method Summary
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getBody()
Get the body of the trigger. |
Trigger |
getTriggerOperation()
Get the operation type of the trigger. |
Trigger |
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. |
Methods inherited from JsonSerializable
Methods inherited from Resource
Methods inherited from java.lang.Object
Constructor Details
Trigger
public Trigger()
Constructor.
Trigger
public Trigger(String jsonString)
Constructor.
Parameters:
Trigger
public Trigger(JSONObject jsonObject)
Constructor.
Parameters:
Method Details
getBody
public String getBody()
Get the body of the trigger.
Returns:
getTriggerOperation
public TriggerOperation getTriggerOperation()
Get the operation type of the trigger.
Returns:
getTriggerType
public TriggerType getTriggerType()
Get the type of the trigger.
Returns:
setBody
public void setBody(String body)
Set the body of the trigger.
Parameters:
setTriggerOperation
public void setTriggerOperation(TriggerOperation triggerOperation)
Set the operation type of the trigger.
Parameters:
setTriggerType
public void setTriggerType(TriggerType triggerType)
Set the type of the resource.
Parameters:
Applies to
Azure SDK for Java