Class JobDefinitionEntity
- java.lang.Object
-
- org.camunda.bpm.engine.impl.persistence.entity.JobDefinitionEntity
-
- All Implemented Interfaces:
java.io.Serializable
,DbEntity
,HasDbReferences
,HasDbRevision
,JobDefinition
public class JobDefinitionEntity extends java.lang.Object implements JobDefinition, HasDbRevision, HasDbReferences, DbEntity, java.io.Serializable
- Author:
- Daniel Meyer
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
activityId
protected java.lang.String
deploymentId
protected java.lang.String
id
protected java.lang.String
jobConfiguration
protected java.lang.Long
jobPriority
protected java.lang.String
jobType
timer, message, ...protected java.lang.String
processDefinitionId
protected java.lang.String
processDefinitionKey
protected int
revision
protected int
suspensionState
protected java.lang.String
tenantId
-
Constructor Summary
Constructors Constructor Description JobDefinitionEntity()
JobDefinitionEntity(JobDeclaration<?,?> jobDeclaration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getActivityId()
The Id of the activity (from BPMN 2.0 Xml) this Job Definition is associated with.java.lang.String
getDeploymentId()
The id of the deployment this job definition is related to.java.lang.String
getId()
java.lang.String
getJobConfiguration()
The configuration of a job definition provides details about the jobs which will be created.java.lang.String
getJobType()
The Type of a job.java.lang.Long
getOverridingJobPriority()
Returns the execution priority for jobs of this definition, if it was set using theManagementService
API.java.lang.Object
getPersistentState()
Returns a representation of the object, as would be stored in the database.java.lang.String
getProcessDefinitionId()
java.lang.String
getProcessDefinitionKey()
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()
int
getSuspensionState()
java.lang.String
getTenantId()
The id of the tenant this job definition belongs to.boolean
isSuspended()
Indicates whether this job definition is suspended.void
setActivityId(java.lang.String activityId)
void
setDeploymentId(java.lang.String deploymentId)
void
setId(java.lang.String id)
void
setJobConfiguration(java.lang.String jobConfiguration)
void
setJobPriority(java.lang.Long jobPriority)
void
setJobType(java.lang.String jobType)
void
setProcessDefinitionId(java.lang.String processDefinitionId)
void
setProcessDefinitionKey(java.lang.String processDefinitionKey)
void
setRevision(int revision)
void
setSuspensionState(int state)
void
setTenantId(java.lang.String tenantId)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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
-
processDefinitionId
protected java.lang.String processDefinitionId
-
processDefinitionKey
protected java.lang.String processDefinitionKey
-
activityId
protected java.lang.String activityId
-
jobType
protected java.lang.String jobType
timer, message, ...
-
jobConfiguration
protected java.lang.String jobConfiguration
-
suspensionState
protected int suspensionState
-
jobPriority
protected java.lang.Long jobPriority
-
tenantId
protected java.lang.String tenantId
-
deploymentId
protected java.lang.String deploymentId
-
-
Constructor Detail
-
JobDefinitionEntity
public JobDefinitionEntity()
-
JobDefinitionEntity
public JobDefinitionEntity(JobDeclaration<?,?> jobDeclaration)
-
-
Method Detail
-
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
-
getRevisionNext
public int getRevisionNext()
- Specified by:
getRevisionNext
in interfaceHasDbRevision
-
getId
public java.lang.String getId()
- Specified by:
getId
in interfaceDbEntity
- Specified by:
getId
in interfaceJobDefinition
- Returns:
- the Id of the job definition.
-
getRevision
public int getRevision()
- Specified by:
getRevision
in interfaceHasDbRevision
-
setRevision
public void setRevision(int revision)
- Specified by:
setRevision
in interfaceHasDbRevision
-
isSuspended
public boolean isSuspended()
Description copied from interface:JobDefinition
Indicates whether this job definition is suspended. If a job Definition is suspended, No Jobs created form the job definition will be acquired by the job executor.- Specified by:
isSuspended
in interfaceJobDefinition
- Returns:
- true if this Job Definition is currently suspended.
-
getProcessDefinitionId
public java.lang.String getProcessDefinitionId()
- Specified by:
getProcessDefinitionId
in interfaceJobDefinition
- Returns:
- the id of the
ProcessDefinition
this job definition is associated with.
-
setProcessDefinitionId
public void setProcessDefinitionId(java.lang.String processDefinitionId)
-
getActivityId
public java.lang.String getActivityId()
Description copied from interface:JobDefinition
The Id of the activity (from BPMN 2.0 Xml) this Job Definition is associated with.- Specified by:
getActivityId
in interfaceJobDefinition
- Returns:
- the activity id for this Job Definition.
-
setActivityId
public void setActivityId(java.lang.String activityId)
-
getJobType
public java.lang.String getJobType()
Description copied from interface:JobDefinition
The Type of a job. Asynchronous continuation, timer, ...- Specified by:
getJobType
in interfaceJobDefinition
- Returns:
- the type of a Job.
-
setJobType
public void setJobType(java.lang.String jobType)
-
getJobConfiguration
public java.lang.String getJobConfiguration()
Description copied from interface:JobDefinition
The configuration of a job definition provides details about the jobs which will be created. For timer jobs this method returns the timer configuration.- Specified by:
getJobConfiguration
in interfaceJobDefinition
- Returns:
- the configuration of this job definition.
-
setJobConfiguration
public void setJobConfiguration(java.lang.String jobConfiguration)
-
getProcessDefinitionKey
public java.lang.String getProcessDefinitionKey()
- Specified by:
getProcessDefinitionKey
in interfaceJobDefinition
- Returns:
- the key of the
ProcessDefinition
this job definition is associated with.
-
setProcessDefinitionKey
public void setProcessDefinitionKey(java.lang.String processDefinitionKey)
-
getSuspensionState
public int getSuspensionState()
-
setSuspensionState
public void setSuspensionState(int state)
-
getOverridingJobPriority
public java.lang.Long getOverridingJobPriority()
Description copied from interface:JobDefinition
Returns the execution priority for jobs of this definition, if it was set using the
ManagementService
API. When a job is assigned a priority, the job definition's overriding priority (if set) is used instead of the values defined in the BPMN XML.- Specified by:
getOverridingJobPriority
in interfaceJobDefinition
- Returns:
- the priority that overrides the default/BPMN XML priority or
null
if no overriding priority is set
-
setJobPriority
public void setJobPriority(java.lang.Long jobPriority)
-
getTenantId
public java.lang.String getTenantId()
Description copied from interface:JobDefinition
The id of the tenant this job definition belongs to. Can benull
if the definition belongs to no single tenant.- Specified by:
getTenantId
in interfaceJobDefinition
-
setTenantId
public void setTenantId(java.lang.String tenantId)
-
getDeploymentId
public java.lang.String getDeploymentId()
Description copied from interface:JobDefinition
The id of the deployment this job definition is related to. In a deployment-aware setup, this leads to all jobs of the same definition being executed on the same node.- Specified by:
getDeploymentId
in interfaceJobDefinition
-
setDeploymentId
public void setDeploymentId(java.lang.String deploymentId)
-
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.
-
-