Class EventSubscriptionEntity
- java.lang.Object
-
- org.camunda.bpm.engine.impl.persistence.entity.EventSubscriptionEntity
-
- All Implemented Interfaces:
java.io.Serializable
,DbEntity
,HasDbReferences
,HasDbRevision
,EventSubscription
public class EventSubscriptionEntity extends java.lang.Object implements EventSubscription, DbEntity, HasDbRevision, HasDbReferences, java.io.Serializable
- Author:
- Daniel Meyer
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ActivityImpl
activity
protected java.lang.String
activityId
protected java.lang.String
configuration
protected java.util.Date
created
protected java.lang.String
eventName
protected java.lang.String
eventType
protected ExecutionEntity
execution
protected java.lang.String
executionId
protected java.lang.String
id
protected EventSubscriptionJobDeclaration
jobDeclaration
protected java.lang.String
processInstanceId
protected int
revision
protected java.lang.String
tenantId
-
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 void
addToExecution()
static EventSubscriptionEntity
createAndInsert(ExecutionEntity executionEntity, EventType eventType, ActivityImpl activity)
static EventSubscriptionEntity
createAndInsert(ExecutionEntity executionEntity, EventType eventType, ActivityImpl activity, java.lang.String configuration)
void
delete()
boolean
equals(java.lang.Object obj)
void
eventReceived(java.lang.Object payload, boolean processASync)
void
eventReceived(java.lang.Object payload, java.lang.Object payloadLocal, java.lang.String businessKey, boolean processASync)
ActivityImpl
getActivity()
java.lang.String
getActivityId()
The identifier of the activity that this event subscription belongs to.java.lang.String
getConfiguration()
java.util.Date
getCreated()
The time this event subscription was created.java.lang.String
getEventName()
The name of the event this subscription belongs to as defined in the process model.java.lang.String
getEventType()
The event subscriptions type.ExecutionEntity
getExecution()
java.lang.String
getExecutionId()
The execution that is subscribed on the referenced event.java.lang.String
getId()
The unique identifier of the event subscription.EventSubscriptionJobDeclaration
getJobDeclaration()
java.lang.Object
getPersistentState()
Returns a representation of the object, as would be stored in the database.ProcessDefinitionEntity
getProcessDefinition()
java.lang.String
getProcessInstanceId()
The process instance this subscription belongs to.java.util.Map<java.lang.String,java.lang.Class>
getReferencedEntitiesIdAndClass()
Scope: IN-MEMORY referencesjava.util.Set<java.lang.String>
getReferencedEntityIds()
Scope: IN-MEMORY referencesint
getRevision()
int
getRevisionNext()
java.lang.String
getTenantId()
The id of the tenant this event subscription belongs to.int
hashCode()
void
insert()
boolean
isSubscriptionForEventType(EventType eventType)
protected void
processEventSync(java.lang.Object payload)
protected void
processEventSync(java.lang.Object payload, java.lang.Object payloadLocal, java.lang.String businessKey)
protected void
removeFromExecution()
protected void
scheduleEventAsync(java.lang.Object payload, java.lang.Object payloadLocal, java.lang.String businessKey)
void
setActivity(ActivityImpl activity)
void
setActivityId(java.lang.String activityId)
void
setConfiguration(java.lang.String configuration)
void
setCreated(java.util.Date created)
void
setEventName(java.lang.String eventName)
void
setEventType(java.lang.String eventType)
void
setExecution(ExecutionEntity execution)
void
setExecutionId(java.lang.String executionId)
void
setId(java.lang.String id)
void
setProcessInstanceId(java.lang.String processInstanceId)
void
setRevision(int revision)
void
setTenantId(java.lang.String tenantId)
java.lang.String
toString()
-
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 java.lang.String id
-
revision
protected int revision
-
eventType
protected java.lang.String eventType
-
eventName
protected java.lang.String eventName
-
executionId
protected java.lang.String executionId
-
processInstanceId
protected java.lang.String processInstanceId
-
activityId
protected java.lang.String activityId
-
configuration
protected java.lang.String configuration
-
created
protected java.util.Date created
-
tenantId
protected java.lang.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(java.lang.Object payload, boolean processASync)
-
eventReceived
public void eventReceived(java.lang.Object payload, java.lang.Object payloadLocal, java.lang.String businessKey, boolean processASync)
-
processEventSync
protected void processEventSync(java.lang.Object payload)
-
processEventSync
protected void processEventSync(java.lang.Object payload, java.lang.Object payloadLocal, java.lang.String businessKey)
-
scheduleEventAsync
protected void scheduleEventAsync(java.lang.Object payload, java.lang.Object payloadLocal, java.lang.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, java.lang.String configuration)
-
addToExecution
protected void addToExecution()
-
removeFromExecution
protected void removeFromExecution()
-
getPersistentState
public java.lang.Object getPersistentState()
Description copied from interface:DbEntity
Returns 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:
getPersistentState
in 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 java.lang.String getId()
Description copied from interface:EventSubscription
The unique identifier of the event subscription.- Specified by:
getId
in interfaceDbEntity
- Specified by:
getId
in interfaceEventSubscription
-
getRevision
public int getRevision()
- Specified by:
getRevision
in interfaceHasDbRevision
-
setRevision
public void setRevision(int revision)
- Specified by:
setRevision
in interfaceHasDbRevision
-
getRevisionNext
public int getRevisionNext()
- Specified by:
getRevisionNext
in interfaceHasDbRevision
-
isSubscriptionForEventType
public boolean isSubscriptionForEventType(EventType eventType)
-
getEventType
public java.lang.String getEventType()
Description copied from interface:EventSubscription
The event subscriptions type. "message" identifies message event subscriptions, "signal" identifies signal event subscription, "compensation" identifies event subscriptions used for compensation events.- Specified by:
getEventType
in interfaceEventSubscription
-
setEventType
public void setEventType(java.lang.String eventType)
-
getEventName
public java.lang.String getEventName()
Description copied from interface:EventSubscription
The name of the event this subscription belongs to as defined in the process model.- Specified by:
getEventName
in interfaceEventSubscription
-
setEventName
public void setEventName(java.lang.String eventName)
-
getExecutionId
public java.lang.String getExecutionId()
Description copied from interface:EventSubscription
The execution that is subscribed on the referenced event.- Specified by:
getExecutionId
in interfaceEventSubscription
-
setExecutionId
public void setExecutionId(java.lang.String executionId)
-
getProcessInstanceId
public java.lang.String getProcessInstanceId()
Description copied from interface:EventSubscription
The process instance this subscription belongs to.- Specified by:
getProcessInstanceId
in interfaceEventSubscription
-
setProcessInstanceId
public void setProcessInstanceId(java.lang.String processInstanceId)
-
getConfiguration
public java.lang.String getConfiguration()
-
setConfiguration
public void setConfiguration(java.lang.String configuration)
-
getActivityId
public java.lang.String getActivityId()
Description copied from interface:EventSubscription
The identifier of the activity that this event subscription belongs to. This could for example be the id of a receive task.- Specified by:
getActivityId
in interfaceEventSubscription
-
setActivityId
public void setActivityId(java.lang.String activityId)
-
getCreated
public java.util.Date getCreated()
Description copied from interface:EventSubscription
The time this event subscription was created.- Specified by:
getCreated
in interfaceEventSubscription
-
setCreated
public void setCreated(java.util.Date created)
-
getTenantId
public java.lang.String getTenantId()
Description copied from interface:EventSubscription
The id of the tenant this event subscription belongs to. Can benull
if the subscription belongs to no single tenant.- Specified by:
getTenantId
in interfaceEventSubscription
-
setTenantId
public void setTenantId(java.lang.String tenantId)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
getReferencedEntityIds
public java.util.Set<java.lang.String> getReferencedEntityIds()
Description copied from interface:HasDbReferences
Scope: IN-MEMORY references
- Specified by:
getReferencedEntityIds
in interfaceHasDbReferences
- Returns:
- the ids of the entities that this entity references. Should only return ids for entities of the same type
-
getReferencedEntitiesIdAndClass
public java.util.Map<java.lang.String,java.lang.Class> getReferencedEntitiesIdAndClass()
Description copied from interface:HasDbReferences
Scope: IN-MEMORY references
- Specified by:
getReferencedEntitiesIdAndClass
in 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.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-