public class Trigger extends Resource
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(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, setResourceId
get, getBoolean, getCollection, getCollection, getDouble, getHashMap, getInt, getList, getLogger, getLong, getMapper, getObject, getObject, getObjectByPath, getString, has, remove, set, toJson, toJson, toObject, toString
public Trigger()
public Trigger(String jsonString)
jsonString
- the json string 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 © 2019. All rights reserved.