public class Trigger extends Resource
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 and Description |
|---|
Trigger()
Constructor.
|
Trigger(org.json.JSONObject jsonObject)
Constructor.
|
Trigger(String jsonString)
Constructor.
|
| 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.
|
getETag, getId, getResourceId, getSelfLink, getTimestamp, setId, setResourceIdget, getBoolean, getCollection, getCollection, getDouble, getHashMap, getInt, getLogger, getLong, getMapper, getObject, getObject, getObjectByPath, getString, has, remove, set, toJson, toJson, toObject, toString, toStringpublic Trigger()
public Trigger(String jsonString)
jsonString - the json string that represents the trigger.public Trigger(org.json.JSONObject jsonObject)
jsonObject - the json object that represents the trigger.public String getBody()
public void setBody(String body)
body - the body of the trigger.public TriggerType getTriggerType()
public void setTriggerType(TriggerType triggerType)
triggerType - the trigger type.public TriggerOperation getTriggerOperation()
public void setTriggerOperation(TriggerOperation triggerOperation)
triggerOperation - the trigger operation.Copyright © 2018. All rights reserved.