Class ImmutableProcessInstanceResultRecordValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableProcessInstanceResultRecordValue
- All Implemented Interfaces:
JsonSerializable,RecordValue,RecordValueWithVariables,ProcessInstanceRelated,ProcessInstanceResultRecordValue
@ParametersAreNonnullByDefault
@Immutable
public final class ImmutableProcessInstanceResultRecordValue
extends Object
implements ProcessInstanceResultRecordValue
Immutable implementation of
ProcessInstanceResultRecordValue.
Use the builder to create immutable instances:
ImmutableProcessInstanceResultRecordValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableProcessInstanceResultRecordValue. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableProcessInstanceResultRecordValue.copyOf(ProcessInstanceResultRecordValue instance) Creates an immutable copy of aProcessInstanceResultRecordValuevalue.booleanThis instance is equal to all instances ofImmutableProcessInstanceResultRecordValuethat have equal attribute values.longlongintinthashCode()Returns a lazily computed hash code from attributes:variables,bpmnProcessId,version,processDefinitionKey,processInstanceKey.toString()Prints the immutable valueProcessInstanceResultRecordValuewith attribute values.withBpmnProcessId(String value) Copy the current immutable object by setting a value for thebpmnProcessIdattribute.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.withVariables(Map<String, ? extends Object> entries) Copy the current immutable object by replacing thevariablesmap with the specified map.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
-
getVariables
- Specified by:
getVariablesin interfaceRecordValueWithVariables- Returns:
- the variables of this record. Can be empty.
-
getBpmnProcessId
- Specified by:
getBpmnProcessIdin interfaceProcessInstanceResultRecordValue- Returns:
- the BPMN process id this process instance belongs to.
-
getVersion
public int getVersion()- Specified by:
getVersionin interfaceProcessInstanceResultRecordValue- Returns:
- the version of the deployed process this instance belongs to.
-
getProcessDefinitionKey
public long getProcessDefinitionKey()- Specified by:
getProcessDefinitionKeyin interfaceProcessInstanceResultRecordValue- Returns:
- the key of the deployed process this instance belongs to.
-
getProcessInstanceKey
public long getProcessInstanceKey()- Specified by:
getProcessInstanceKeyin interfaceProcessInstanceRelated- Specified by:
getProcessInstanceKeyin interfaceProcessInstanceResultRecordValue- Returns:
- the key of the process instance
-
withVariables
public final ImmutableProcessInstanceResultRecordValue withVariables(Map<String, ? extends Object> entries) Copy the current immutable object by replacing thevariablesmap with the specified map. Nulls are not permitted as keys or values. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
entries- The entries to be added to the variables map- Returns:
- A modified copy of
thisobject
-
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
-
equals
This instance is equal to all instances ofImmutableProcessInstanceResultRecordValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:variables,bpmnProcessId,version,processDefinitionKey,processInstanceKey. -
toString
Prints the immutable valueProcessInstanceResultRecordValuewith attribute values. -
copyOf
public static ImmutableProcessInstanceResultRecordValue copyOf(ProcessInstanceResultRecordValue instance) Creates an immutable copy of aProcessInstanceResultRecordValuevalue. 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 ProcessInstanceResultRecordValue instance
-
builder
Creates a builder forImmutableProcessInstanceResultRecordValue.ImmutableProcessInstanceResultRecordValue.builder() .putVariable|putAllVariables(String => Object) //variablesmappings .withBpmnProcessId(String | null) // nullablebpmnProcessId.withVersion(int) // optionalversion.withProcessDefinitionKey(long) // optionalprocessDefinitionKey.withProcessInstanceKey(long) // optionalprocessInstanceKey.build();- Returns:
- A new ImmutableProcessInstanceResultRecordValue builder
-