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.String
groupId
protected java.lang.String
id
protected static EnginePersistenceLogger
LOG
protected ProcessDefinitionEntity
processDef
protected java.lang.String
processDefId
protected TaskEntity
task
protected java.lang.String
taskId
protected java.lang.String
tenantId
protected java.lang.String
type
protected java.lang.String
userId
-
Constructor Summary
Constructors Constructor Description IdentityLinkEntity()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IdentityLinkEntity
createAndInsert()
void
delete()
void
delete(boolean withHistory)
void
fireHistoricIdentityLinkEvent(HistoryEventType eventType)
java.lang.String
getGroupId()
If the identity link involves a group, then this will be a non-null id of a group.java.lang.String
getId()
Get the Id of identityLinkjava.lang.Object
getPersistentState()
Returns a representation of the object, as would be stored in the database.ProcessDefinitionEntity
getProcessDef()
java.lang.String
getProcessDefId()
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 referencesTaskEntity
getTask()
java.lang.String
getTaskId()
The id of the task associated with this identity link.java.lang.String
getTenantId()
The id of the tenant associated with this identity link.java.lang.String
getType()
Returns the type of link.java.lang.String
getUserId()
If the identity link involves a user, then this will be a non-null id of a user.void
insert()
boolean
isGroup()
boolean
isUser()
static IdentityLinkEntity
newIdentityLink()
void
setGroupId(java.lang.String groupId)
void
setId(java.lang.String id)
void
setProcessDef(ProcessDefinitionEntity processDef)
void
setProcessDefId(java.lang.String processDefId)
void
setTask(TaskEntity task)
void
setTenantId(java.lang.String tenantId)
void
setType(java.lang.String type)
void
setUserId(java.lang.String userId)
java.lang.String
toString()
-
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: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
-
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:IdentityLink
Get the Id of identityLink- Specified by:
getId
in interfaceDbEntity
- Specified by:
getId
in interfaceIdentityLink
-
getType
public java.lang.String getType()
Description copied from interface:IdentityLink
Returns the type of link. SeeIdentityLinkType
for the native supported types by the process engine.- Specified by:
getType
in interfaceIdentityLink
-
setType
public void setType(java.lang.String type)
-
getUserId
public java.lang.String getUserId()
Description copied from interface:IdentityLink
If 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 theUserQuery
API.- Specified by:
getUserId
in interfaceIdentityLink
-
setUserId
public void setUserId(java.lang.String userId)
-
getGroupId
public java.lang.String getGroupId()
Description copied from interface:IdentityLink
If 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 theGroupQuery
API.- Specified by:
getGroupId
in interfaceIdentityLink
-
setGroupId
public void setGroupId(java.lang.String groupId)
-
getTaskId
public java.lang.String getTaskId()
Description copied from interface:IdentityLink
The id of the task associated with this identity link.- Specified by:
getTaskId
in interfaceIdentityLink
-
getProcessDefId
public java.lang.String getProcessDefId()
Description copied from interface:IdentityLink
Get the process definition id- Specified by:
getProcessDefId
in interfaceIdentityLink
-
setProcessDefId
public void setProcessDefId(java.lang.String processDefId)
-
getTenantId
public java.lang.String getTenantId()
Description copied from interface:IdentityLink
The id of the tenant associated with this identity link.- Specified by:
getTenantId
in 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: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
-
-