Class ImmutableProcessInstanceRecordValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableProcessInstanceRecordValue
- All Implemented Interfaces:
JsonSerializable,RecordValue,ProcessInstanceRecordValue,ProcessInstanceRelated
@ParametersAreNonnullByDefault
@Immutable
public final class ImmutableProcessInstanceRecordValue
extends Object
implements ProcessInstanceRecordValue
Immutable implementation of
ProcessInstanceRecordValue.
Use the builder to create immutable instances:
ImmutableProcessInstanceRecordValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableProcessInstanceRecordValue. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableProcessInstanceRecordValue.copyOf(ProcessInstanceRecordValue instance) Creates an immutable copy of aProcessInstanceRecordValuevalue.booleanThis instance is equal to all instances ofImmutableProcessInstanceRecordValuethat have equal attribute values.longlonglonglonglongintinthashCode()Returns a lazily computed hash code from attributes:bpmnProcessId,version,processDefinitionKey,processInstanceKey,elementId,flowScopeKey,bpmnElementType,parentProcessInstanceKey,parentElementInstanceKey,bpmnEventType.toString()Prints the immutable valueProcessInstanceRecordValuewith attribute values.Copy the current immutable object by setting a value for thebpmnElementTypeattribute.withBpmnEventType(BpmnEventType value) Copy the current immutable object by setting a value for thebpmnEventTypeattribute.withBpmnProcessId(String value) Copy the current immutable object by setting a value for thebpmnProcessIdattribute.withElementId(String value) Copy the current immutable object by setting a value for theelementIdattribute.withFlowScopeKey(long value) Copy the current immutable object by setting a value for theflowScopeKeyattribute.withParentElementInstanceKey(long value) Copy the current immutable object by setting a value for theparentElementInstanceKeyattribute.withParentProcessInstanceKey(long value) Copy the current immutable object by setting a value for theparentProcessInstanceKeyattribute.withProcessDefinitionKey(long value) Copy the current immutable object by setting a value for theprocessDefinitionKeyattribute.withProcessInstanceKey(long value) Copy the current immutable object by setting a value for theprocessInstanceKeyattribute.withVersion(int value) Copy the current immutable object by setting a value for theversionattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.camunda.zeebe.protocol.record.JsonSerializable
toJson
-
Method Details
-
getBpmnProcessId
- Specified by:
getBpmnProcessIdin interfaceProcessInstanceRecordValue- Returns:
- the BPMN process id this process instance belongs to.
-
getVersion
public int getVersion()- Specified by:
getVersionin interfaceProcessInstanceRecordValue- Returns:
- the version of the deployed process this instance belongs to.
-
getProcessDefinitionKey
public long getProcessDefinitionKey()- Specified by:
getProcessDefinitionKeyin interfaceProcessInstanceRecordValue- Returns:
- the key of the deployed process this instance belongs to.
-
getProcessInstanceKey
public long getProcessInstanceKey()- Specified by:
getProcessInstanceKeyin interfaceProcessInstanceRecordValue- Specified by:
getProcessInstanceKeyin interfaceProcessInstanceRelated- Returns:
- the key of the process instance
-
getElementId
- Specified by:
getElementIdin interfaceProcessInstanceRecordValue- Returns:
- the id of the current process element, or empty if the id is not specified.
-
getFlowScopeKey
public long getFlowScopeKey()- Specified by:
getFlowScopeKeyin interfaceProcessInstanceRecordValue- Returns:
- the key of the activity instance that is the flow scope of this flow element instance; -1 for records of the process instance itself.
-
getBpmnElementType
- Specified by:
getBpmnElementTypein interfaceProcessInstanceRecordValue- Returns:
- the BPMN type of the current process element.
-
getParentProcessInstanceKey
public long getParentProcessInstanceKey()- Specified by:
getParentProcessInstanceKeyin interfaceProcessInstanceRecordValue- Returns:
- the key of the process instance that created this instance, or -1 if it was not created by another process instance.
-
getParentElementInstanceKey
public long getParentElementInstanceKey()- Specified by:
getParentElementInstanceKeyin interfaceProcessInstanceRecordValue- Returns:
- the key of the element instance that created this instance, or -1 if it was not created by another process instance.
-
getBpmnEventType
- Specified by:
getBpmnEventTypein interfaceProcessInstanceRecordValue- Returns:
- the BPMN event type of the current process element.
-
withBpmnProcessId
Copy the current immutable object by setting a value for thebpmnProcessIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for bpmnProcessId (can benull)- Returns:
- A modified copy of the
thisobject
-
withVersion
Copy the current immutable object by setting a value for theversionattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for version- Returns:
- A modified copy of the
thisobject
-
withProcessDefinitionKey
Copy the current immutable object by setting a value for theprocessDefinitionKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for processDefinitionKey- Returns:
- A modified copy of the
thisobject
-
withProcessInstanceKey
Copy the current immutable object by setting a value for theprocessInstanceKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for processInstanceKey- Returns:
- A modified copy of the
thisobject
-
withElementId
Copy the current immutable object by setting a value for theelementIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for elementId (can benull)- Returns:
- A modified copy of the
thisobject
-
withFlowScopeKey
Copy the current immutable object by setting a value for theflowScopeKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for flowScopeKey- Returns:
- A modified copy of the
thisobject
-
withBpmnElementType
Copy the current immutable object by setting a value for thebpmnElementTypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for bpmnElementType (can benull)- Returns:
- A modified copy of the
thisobject
-
withParentProcessInstanceKey
Copy the current immutable object by setting a value for theparentProcessInstanceKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for parentProcessInstanceKey- Returns:
- A modified copy of the
thisobject
-
withParentElementInstanceKey
Copy the current immutable object by setting a value for theparentElementInstanceKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for parentElementInstanceKey- Returns:
- A modified copy of the
thisobject
-
withBpmnEventType
Copy the current immutable object by setting a value for thebpmnEventTypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for bpmnEventType (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableProcessInstanceRecordValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:bpmnProcessId,version,processDefinitionKey,processInstanceKey,elementId,flowScopeKey,bpmnElementType,parentProcessInstanceKey,parentElementInstanceKey,bpmnEventType. -
toString
Prints the immutable valueProcessInstanceRecordValuewith attribute values. -
copyOf
Creates an immutable copy of aProcessInstanceRecordValuevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable ProcessInstanceRecordValue instance
-
builder
Creates a builder forImmutableProcessInstanceRecordValue.ImmutableProcessInstanceRecordValue.builder() .withBpmnProcessId(String | null) // nullablebpmnProcessId.withVersion(int) // optionalversion.withProcessDefinitionKey(long) // optionalprocessDefinitionKey.withProcessInstanceKey(long) // optionalprocessInstanceKey.withElementId(String | null) // nullableelementId.withFlowScopeKey(long) // optionalflowScopeKey.withBpmnElementType(io.camunda.zeebe.protocol.record.value.BpmnElementType | null) // nullablebpmnElementType.withParentProcessInstanceKey(long) // optionalparentProcessInstanceKey.withParentElementInstanceKey(long) // optionalparentElementInstanceKey.withBpmnEventType(io.camunda.zeebe.protocol.record.value.BpmnEventType | null) // nullablebpmnEventType.build();- Returns:
- A new ImmutableProcessInstanceRecordValue builder
-