Class IdentityLinkEntity
- java.lang.Object
-
- org.camunda.bpm.engine.impl.persistence.entity.IdentityLinkEntity
-
- All Implemented Interfaces:
java.io.Serializable,DbEntity,HasDbReferences,IdentityLink
public class IdentityLinkEntity extends java.lang.Object implements java.io.Serializable, IdentityLink, DbEntity, HasDbReferences
- Author:
- Joram Barrez, Deivarayan Azhagappan
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.StringgroupIdprotected java.lang.Stringidprotected static EnginePersistenceLoggerLOGprotected ProcessDefinitionEntityprocessDefprotected java.lang.StringprocessDefIdprotected TaskEntitytaskprotected java.lang.StringtaskIdprotected java.lang.StringtenantIdprotected java.lang.Stringtypeprotected java.lang.StringuserId
-
Constructor Summary
Constructors Constructor Description IdentityLinkEntity()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IdentityLinkEntitycreateAndInsert()voiddelete()voiddelete(boolean withHistory)voidfireHistoricIdentityLinkEvent(HistoryEventType eventType)java.lang.StringgetGroupId()If the identity link involves a group, then this will be a non-null id of a group.java.lang.StringgetId()Get the Id of identityLinkjava.lang.ObjectgetPersistentState()Returns a representation of the object, as would be stored in the database.ProcessDefinitionEntitygetProcessDef()java.lang.StringgetProcessDefId()Get the process definition idjava.util.Map<java.lang.String,java.lang.Class>getReferencedEntitiesIdAndClass()Scope: IN-MEMORY referencesjava.util.Set<java.lang.String>getReferencedEntityIds()Scope: IN-MEMORY referencesTaskEntitygetTask()java.lang.StringgetTaskId()The id of the task associated with this identity link.java.lang.StringgetTenantId()The id of the tenant associated with this identity link.java.lang.StringgetType()Returns the type of link.java.lang.StringgetUserId()If the identity link involves a user, then this will be a non-null id of a user.voidinsert()booleanisGroup()booleanisUser()static IdentityLinkEntitynewIdentityLink()voidsetGroupId(java.lang.String groupId)voidsetId(java.lang.String id)voidsetProcessDef(ProcessDefinitionEntity processDef)voidsetProcessDefId(java.lang.String processDefId)voidsetTask(TaskEntity task)voidsetTenantId(java.lang.String tenantId)voidsetType(java.lang.String type)voidsetUserId(java.lang.String userId)java.lang.StringtoString()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.camunda.bpm.engine.impl.db.HasDbReferences
getDependentEntities
-
-
-
-
Field Detail
-
LOG
protected static final EnginePersistenceLogger LOG
-
id
protected java.lang.String id
-
type
protected java.lang.String type
-
userId
protected java.lang.String userId
-
groupId
protected java.lang.String groupId
-
taskId
protected java.lang.String taskId
-
processDefId
protected java.lang.String processDefId
-
tenantId
protected java.lang.String tenantId
-
task
protected TaskEntity task
-
processDef
protected ProcessDefinitionEntity processDef
-
-
Method Detail
-
getPersistentState
public java.lang.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
-
createAndInsert
public static IdentityLinkEntity createAndInsert()
-
newIdentityLink
public static IdentityLinkEntity newIdentityLink()
-
insert
public void insert()
-
delete
public void delete()
-
delete
public void delete(boolean withHistory)
-
isUser
public boolean isUser()
-
isGroup
public boolean isGroup()
-
getId
public java.lang.String getId()
Description copied from interface:IdentityLinkGet the Id of identityLink- Specified by:
getIdin interfaceDbEntity- Specified by:
getIdin interfaceIdentityLink
-
getType
public java.lang.String getType()
Description copied from interface:IdentityLinkReturns the type of link. SeeIdentityLinkTypefor the native supported types by the process engine.- Specified by:
getTypein interfaceIdentityLink
-
setType
public void setType(java.lang.String type)
-
getUserId
public java.lang.String getUserId()
Description copied from interface:IdentityLinkIf the identity link involves a user, then this will be a non-null id of a user. That userId can be used to query for user information through theUserQueryAPI.- Specified by:
getUserIdin interfaceIdentityLink
-
setUserId
public void setUserId(java.lang.String userId)
-
getGroupId
public java.lang.String getGroupId()
Description copied from interface:IdentityLinkIf the identity link involves a group, then this will be a non-null id of a group. That groupId can be used to query for user information through theGroupQueryAPI.- Specified by:
getGroupIdin interfaceIdentityLink
-
setGroupId
public void setGroupId(java.lang.String groupId)
-
getTaskId
public java.lang.String getTaskId()
Description copied from interface:IdentityLinkThe id of the task associated with this identity link.- Specified by:
getTaskIdin interfaceIdentityLink
-
getProcessDefId
public java.lang.String getProcessDefId()
Description copied from interface:IdentityLinkGet the process definition id- Specified by:
getProcessDefIdin interfaceIdentityLink
-
setProcessDefId
public void setProcessDefId(java.lang.String processDefId)
-
getTenantId
public java.lang.String getTenantId()
Description copied from interface:IdentityLinkThe id of the tenant associated with this identity link.- Specified by:
getTenantIdin interfaceIdentityLink
-
setTenantId
public void setTenantId(java.lang.String tenantId)
-
getTask
public TaskEntity getTask()
-
setTask
public void setTask(TaskEntity task)
-
getProcessDef
public ProcessDefinitionEntity getProcessDef()
-
setProcessDef
public void setProcessDef(ProcessDefinitionEntity processDef)
-
fireHistoricIdentityLinkEvent
public void fireHistoricIdentityLinkEvent(HistoryEventType eventType)
-
getReferencedEntityIds
public java.util.Set<java.lang.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 java.util.Map<java.lang.String,java.lang.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.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-