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:
-
Field Summary
Modifier and TypeFieldDescriptionprotected ActivityImpl
protected String
protected String
protected Date
protected String
protected String
protected ExecutionEntity
protected String
protected String
protected EventSubscriptionJobDeclaration
protected String
protected int
protected String
-
Constructor Summary
ConstructorDescriptionEventSubscriptionEntity
(EventType eventType) EventSubscriptionEntity
(ExecutionEntity executionEntity, EventType eventType) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
static EventSubscriptionEntity
createAndInsert
(ExecutionEntity executionEntity, EventType eventType, ActivityImpl activity) static EventSubscriptionEntity
createAndInsert
(ExecutionEntity executionEntity, EventType eventType, ActivityImpl activity, String configuration) void
delete()
boolean
void
eventReceived
(Object payload, boolean processASync) void
eventReceived
(Object payload, Object payloadLocal, String businessKey, boolean processASync) The identifier of the activity that this event subscription belongs to.The time this event subscription was created.The name of the event this subscription belongs to as defined in the process model.The event subscriptions type.The execution that is subscribed on the referenced event.getId()
The unique identifier of the event subscription.Returns a representation of the object, as would be stored in the database.The process instance this subscription belongs to.Scope: IN-MEMORY referencesScope: IN-MEMORY referencesint
int
The id of the tenant this event subscription belongs to.int
hashCode()
void
insert()
boolean
isSubscriptionForEventType
(EventType eventType) protected void
processEventSync
(Object payload) protected void
processEventSync
(Object payload, Object payloadLocal, String businessKey) protected void
protected void
scheduleEventAsync
(Object payload, Object payloadLocal, String businessKey) void
setActivity
(ActivityImpl activity) void
setActivityId
(String activityId) void
setConfiguration
(String configuration) void
setCreated
(Date created) void
setEventName
(String eventName) void
setEventType
(String eventType) void
setExecution
(ExecutionEntity execution) void
setExecutionId
(String executionId) void
void
setProcessInstanceId
(String processInstanceId) void
setRevision
(int revision) void
setTenantId
(String tenantId) 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 Details
-
id
-
revision
protected int revision -
eventType
-
eventName
-
executionId
-
processInstanceId
-
activityId
-
configuration
-
created
-
tenantId
-
execution
-
activity
-
jobDeclaration
-
-
Constructor Details
-
EventSubscriptionEntity
public EventSubscriptionEntity() -
EventSubscriptionEntity
-
EventSubscriptionEntity
-
-
Method Details
-
eventReceived
-
eventReceived
-
processEventSync
-
processEventSync
-
scheduleEventAsync
-
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
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
-
setExecution
-
getActivity
-
getProcessDefinition
-
setActivity
-
getJobDeclaration
-
getId
Description copied from interface:EventSubscription
The unique identifier of the event subscription.- Specified by:
getId
in interfaceDbEntity
- Specified by:
getId
in interfaceEventSubscription
-
setId
-
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
-
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
-
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
-
getExecutionId
Description copied from interface:EventSubscription
The execution that is subscribed on the referenced event.- Specified by:
getExecutionId
in interfaceEventSubscription
-
setExecutionId
-
getProcessInstanceId
Description copied from interface:EventSubscription
The process instance this subscription belongs to.- Specified by:
getProcessInstanceId
in interfaceEventSubscription
-
setProcessInstanceId
-
getConfiguration
-
setConfiguration
-
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
-
getCreated
Description copied from interface:EventSubscription
The time this event subscription was created.- Specified by:
getCreated
in interfaceEventSubscription
-
setCreated
-
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
-
hashCode
public int hashCode() -
equals
-
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
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
-