Class EventSubscriptionEntity
- java.lang.Object
-
- org.camunda.bpm.engine.impl.persistence.entity.EventSubscriptionEntity
-
- All Implemented Interfaces:
Serializable,DbEntity,HasDbReferences,HasDbRevision,EventSubscription
public class EventSubscriptionEntity extends Object implements EventSubscription, DbEntity, HasDbRevision, HasDbReferences, Serializable
- Author:
- Daniel Meyer
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ActivityImplactivityprotected StringactivityIdprotected Stringconfigurationprotected Datecreatedprotected StringeventNameprotected StringeventTypeprotected ExecutionEntityexecutionprotected StringexecutionIdprotected Stringidprotected EventSubscriptionJobDeclarationjobDeclarationprotected StringprocessInstanceIdprotected intrevisionprotected StringtenantId
-
Constructor Summary
Constructors Constructor Description EventSubscriptionEntity()EventSubscriptionEntity(EventType eventType)EventSubscriptionEntity(ExecutionEntity executionEntity, EventType eventType)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddToExecution()static EventSubscriptionEntitycreateAndInsert(ExecutionEntity executionEntity, EventType eventType, ActivityImpl activity)static EventSubscriptionEntitycreateAndInsert(ExecutionEntity executionEntity, EventType eventType, ActivityImpl activity, String configuration)voiddelete()booleanequals(Object obj)voideventReceived(Object payload, boolean processASync)voideventReceived(Object payload, Object payloadLocal, String businessKey, boolean processASync)ActivityImplgetActivity()StringgetActivityId()The identifier of the activity that this event subscription belongs to.StringgetConfiguration()DategetCreated()The time this event subscription was created.StringgetEventName()The name of the event this subscription belongs to as defined in the process model.StringgetEventType()The event subscriptions type.ExecutionEntitygetExecution()StringgetExecutionId()The execution that is subscribed on the referenced event.StringgetId()The unique identifier of the event subscription.EventSubscriptionJobDeclarationgetJobDeclaration()ObjectgetPersistentState()Returns a representation of the object, as would be stored in the database.ProcessDefinitionEntitygetProcessDefinition()StringgetProcessInstanceId()The process instance this subscription belongs to.Map<String,Class>getReferencedEntitiesIdAndClass()Scope: IN-MEMORY referencesSet<String>getReferencedEntityIds()Scope: IN-MEMORY referencesintgetRevision()intgetRevisionNext()StringgetTenantId()The id of the tenant this event subscription belongs to.inthashCode()voidinsert()booleanisSubscriptionForEventType(EventType eventType)protected voidprocessEventSync(Object payload)protected voidprocessEventSync(Object payload, Object payloadLocal, String businessKey)protected voidremoveFromExecution()protected voidscheduleEventAsync(Object payload, Object payloadLocal, String businessKey)voidsetActivity(ActivityImpl activity)voidsetActivityId(String activityId)voidsetConfiguration(String configuration)voidsetCreated(Date created)voidsetEventName(String eventName)voidsetEventType(String eventType)voidsetExecution(ExecutionEntity execution)voidsetExecutionId(String executionId)voidsetId(String id)voidsetProcessInstanceId(String processInstanceId)voidsetRevision(int revision)voidsetTenantId(String tenantId)StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.camunda.bpm.engine.impl.db.HasDbReferences
getDependentEntities
-
-
-
-
Field Detail
-
id
protected String id
-
revision
protected int revision
-
eventType
protected String eventType
-
eventName
protected String eventName
-
executionId
protected String executionId
-
processInstanceId
protected String processInstanceId
-
activityId
protected String activityId
-
configuration
protected String configuration
-
created
protected Date created
-
tenantId
protected String tenantId
-
execution
protected ExecutionEntity execution
-
activity
protected ActivityImpl activity
-
jobDeclaration
protected EventSubscriptionJobDeclaration jobDeclaration
-
-
Constructor Detail
-
EventSubscriptionEntity
public EventSubscriptionEntity()
-
EventSubscriptionEntity
public EventSubscriptionEntity(EventType eventType)
-
EventSubscriptionEntity
public EventSubscriptionEntity(ExecutionEntity executionEntity, EventType eventType)
-
-
Method Detail
-
eventReceived
public void eventReceived(Object payload, boolean processASync)
-
eventReceived
public void eventReceived(Object payload, Object payloadLocal, String businessKey, boolean processASync)
-
processEventSync
protected void processEventSync(Object payload)
-
processEventSync
protected void processEventSync(Object payload, Object payloadLocal, String businessKey)
-
scheduleEventAsync
protected void scheduleEventAsync(Object payload, Object payloadLocal, String businessKey)
-
delete
public void delete()
-
insert
public void insert()
-
createAndInsert
public static EventSubscriptionEntity createAndInsert(ExecutionEntity executionEntity, EventType eventType, ActivityImpl activity)
-
createAndInsert
public static EventSubscriptionEntity createAndInsert(ExecutionEntity executionEntity, EventType eventType, ActivityImpl activity, String configuration)
-
addToExecution
protected void addToExecution()
-
removeFromExecution
protected void removeFromExecution()
-
getPersistentState
public Object getPersistentState()
Description copied from interface:DbEntityReturns a representation of the object, as would be stored in the database. Used when deciding if updates have occurred to the object or not since it was last loaded.- Specified by:
getPersistentStatein interfaceDbEntity
-
getExecution
public ExecutionEntity getExecution()
-
setExecution
public void setExecution(ExecutionEntity execution)
-
getActivity
public ActivityImpl getActivity()
-
getProcessDefinition
public ProcessDefinitionEntity getProcessDefinition()
-
setActivity
public void setActivity(ActivityImpl activity)
-
getJobDeclaration
public EventSubscriptionJobDeclaration getJobDeclaration()
-
getId
public String getId()
Description copied from interface:EventSubscriptionThe unique identifier of the event subscription.- Specified by:
getIdin interfaceDbEntity- Specified by:
getIdin interfaceEventSubscription
-
getRevision
public int getRevision()
- Specified by:
getRevisionin interfaceHasDbRevision
-
setRevision
public void setRevision(int revision)
- Specified by:
setRevisionin interfaceHasDbRevision
-
getRevisionNext
public int getRevisionNext()
- Specified by:
getRevisionNextin interfaceHasDbRevision
-
isSubscriptionForEventType
public boolean isSubscriptionForEventType(EventType eventType)
-
getEventType
public String getEventType()
Description copied from interface:EventSubscriptionThe event subscriptions type. "message" identifies message event subscriptions, "signal" identifies signal event subscription, "compensation" identifies event subscriptions used for compensation events.- Specified by:
getEventTypein interfaceEventSubscription
-
setEventType
public void setEventType(String eventType)
-
getEventName
public String getEventName()
Description copied from interface:EventSubscriptionThe name of the event this subscription belongs to as defined in the process model.- Specified by:
getEventNamein interfaceEventSubscription
-
setEventName
public void setEventName(String eventName)
-
getExecutionId
public String getExecutionId()
Description copied from interface:EventSubscriptionThe execution that is subscribed on the referenced event.- Specified by:
getExecutionIdin interfaceEventSubscription
-
setExecutionId
public void setExecutionId(String executionId)
-
getProcessInstanceId
public String getProcessInstanceId()
Description copied from interface:EventSubscriptionThe process instance this subscription belongs to.- Specified by:
getProcessInstanceIdin interfaceEventSubscription
-
setProcessInstanceId
public void setProcessInstanceId(String processInstanceId)
-
getConfiguration
public String getConfiguration()
-
setConfiguration
public void setConfiguration(String configuration)
-
getActivityId
public String getActivityId()
Description copied from interface:EventSubscriptionThe identifier of the activity that this event subscription belongs to. This could for example be the id of a receive task.- Specified by:
getActivityIdin interfaceEventSubscription
-
setActivityId
public void setActivityId(String activityId)
-
getCreated
public Date getCreated()
Description copied from interface:EventSubscriptionThe time this event subscription was created.- Specified by:
getCreatedin interfaceEventSubscription
-
setCreated
public void setCreated(Date created)
-
getTenantId
public String getTenantId()
Description copied from interface:EventSubscriptionThe id of the tenant this event subscription belongs to. Can benullif the subscription belongs to no single tenant.- Specified by:
getTenantIdin interfaceEventSubscription
-
setTenantId
public void setTenantId(String tenantId)
-
getReferencedEntityIds
public Set<String> getReferencedEntityIds()
Description copied from interface:HasDbReferencesScope: IN-MEMORY references
- Specified by:
getReferencedEntityIdsin interfaceHasDbReferences- Returns:
- the ids of the entities that this entity references. Should only return ids for entities of the same type
-
getReferencedEntitiesIdAndClass
public Map<String,Class> getReferencedEntitiesIdAndClass()
Description copied from interface:HasDbReferencesScope: IN-MEMORY references
- Specified by:
getReferencedEntitiesIdAndClassin interfaceHasDbReferences- Returns:
- a map of the ids and the entities' classes that this entity references. It's used when trying to determine if there was an Optimistic Locking occurrence on an INSERT or UPDATE of an object of this type.
-
-