org.camunda.bpm.engine.impl.persistence.entity
Class EventSubscriptionEntity

java.lang.Object
  extended by org.camunda.bpm.engine.impl.persistence.entity.EventSubscriptionEntity
All Implemented Interfaces:
Serializable, DbEntity, HasDbRevision, EventSubscription

public class EventSubscriptionEntity
extends Object
implements EventSubscription, DbEntity, HasDbRevision, Serializable

Author:
Daniel Meyer
See Also:
Serialized Form

Field Summary
protected  ActivityImpl activity
           
protected  String activityId
           
protected  String configuration
           
protected  Date created
           
protected  String eventName
           
protected  String eventType
           
protected  ExecutionEntity execution
           
protected  String executionId
           
protected  String id
           
protected  EventSubscriptionJobDeclaration jobDeclaration
           
protected  String processInstanceId
           
protected  int revision
           
protected  String tenantId
           
 
Constructor Summary
EventSubscriptionEntity()
           
EventSubscriptionEntity(EventType eventType)
           
EventSubscriptionEntity(ExecutionEntity executionEntity, EventType eventType)
           
 
Method Summary
protected  void addToExecution()
           
static EventSubscriptionEntity createAndInsert(ExecutionEntity executionEntity, EventType eventType, ActivityImpl activity)
           
static EventSubscriptionEntity createAndInsert(ExecutionEntity executionEntity, EventType eventType, ActivityImpl activity, String configuration)
           
 void delete()
           
 boolean equals(Object obj)
           
 void eventReceived(Object payload, boolean processASync)
           
 ActivityImpl getActivity()
           
 String getActivityId()
          The identifier of the activity that this event subscription belongs to.
 String getConfiguration()
           
 Date getCreated()
          The time this event subscription was created.
 String getEventName()
          The name of the event this subscription belongs to as defined in the process model.
 String getEventType()
          The event subscriptions type.
 ExecutionEntity getExecution()
           
 String getExecutionId()
          The execution that is subscribed on the referenced event.
 String getId()
          The unique identifier of the event subscription.
 EventSubscriptionJobDeclaration getJobDeclaration()
           
 Object getPersistentState()
          Returns a representation of the object, as would be stored in the database.
 ProcessDefinitionEntity getProcessDefinition()
           
 String getProcessInstanceId()
          The process instance this subscription belongs to.
 int getRevision()
           
 int getRevisionNext()
           
 String getTenantId()
          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 removeFromExecution()
           
protected  void scheduleEventAsync(Object payload)
           
 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 setId(String id)
           
 void setProcessInstanceId(String processInstanceId)
           
 void setRevision(int revision)
           
 void setTenantId(String tenantId)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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)

processEventSync

protected void processEventSync(Object payload)

scheduleEventAsync

protected void scheduleEventAsync(Object payload)

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: 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 interface DbEntity

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: EventSubscription
The unique identifier of the event subscription.

Specified by:
getId in interface DbEntity
Specified by:
getId in interface EventSubscription

setId

public void setId(String id)
Specified by:
setId in interface DbEntity

getRevision

public int getRevision()
Specified by:
getRevision in interface HasDbRevision

setRevision

public void setRevision(int revision)
Specified by:
setRevision in interface HasDbRevision

getRevisionNext

public int getRevisionNext()
Specified by:
getRevisionNext in interface HasDbRevision

isSubscriptionForEventType

public boolean isSubscriptionForEventType(EventType eventType)

getEventType

public 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 interface EventSubscription

setEventType

public void setEventType(String eventType)

getEventName

public 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 interface EventSubscription

setEventName

public void setEventName(String eventName)

getExecutionId

public String getExecutionId()
Description copied from interface: EventSubscription
The execution that is subscribed on the referenced event.

Specified by:
getExecutionId in interface EventSubscription

setExecutionId

public void setExecutionId(String executionId)

getProcessInstanceId

public String getProcessInstanceId()
Description copied from interface: EventSubscription
The process instance this subscription belongs to.

Specified by:
getProcessInstanceId in interface EventSubscription

setProcessInstanceId

public void setProcessInstanceId(String processInstanceId)

getConfiguration

public String getConfiguration()

setConfiguration

public void setConfiguration(String configuration)

getActivityId

public 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 interface EventSubscription

setActivityId

public void setActivityId(String activityId)

getCreated

public Date getCreated()
Description copied from interface: EventSubscription
The time this event subscription was created.

Specified by:
getCreated in interface EventSubscription

setCreated

public void setCreated(Date created)

getTenantId

public String getTenantId()
Description copied from interface: EventSubscription
The id of the tenant this event subscription belongs to. Can be null if the subscription belongs to no single tenant.

Specified by:
getTenantId in interface EventSubscription

setTenantId

public void setTenantId(String tenantId)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2017 camunda services GmbH. All rights reserved.