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().

  • Method Details

    • getVariables

      public Map<String,Object> getVariables()
      Specified by:
      getVariables in interface RecordValueWithVariables
      Returns:
      the variables of this record. Can be empty.
    • getBpmnProcessId

      public String getBpmnProcessId()
      Specified by:
      getBpmnProcessId in interface ProcessInstanceResultRecordValue
      Returns:
      the BPMN process id this process instance belongs to.
    • getVersion

      public int getVersion()
      Specified by:
      getVersion in interface ProcessInstanceResultRecordValue
      Returns:
      the version of the deployed process this instance belongs to.
    • getProcessDefinitionKey

      public long getProcessDefinitionKey()
      Specified by:
      getProcessDefinitionKey in interface ProcessInstanceResultRecordValue
      Returns:
      the key of the deployed process this instance belongs to.
    • getProcessInstanceKey

      public long getProcessInstanceKey()
      Specified by:
      getProcessInstanceKey in interface ProcessInstanceRelated
      Specified by:
      getProcessInstanceKey in interface ProcessInstanceResultRecordValue
      Returns:
      the key of the process instance
    • withVariables

      public final ImmutableProcessInstanceResultRecordValue withVariables(Map<String,? extends Object> entries)
      Copy the current immutable object by replacing the variables map 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 returning this.
      Parameters:
      entries - The entries to be added to the variables map
      Returns:
      A modified copy of this object
    • withBpmnProcessId

      public final ImmutableProcessInstanceResultRecordValue withBpmnProcessId(String value)
      Copy the current immutable object by setting a value for the bpmnProcessId attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for bpmnProcessId (can be null)
      Returns:
      A modified copy of the this object
    • withVersion

      public final ImmutableProcessInstanceResultRecordValue withVersion(int value)
      Copy the current immutable object by setting a value for the version attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for version
      Returns:
      A modified copy of the this object
    • withProcessDefinitionKey

      public final ImmutableProcessInstanceResultRecordValue withProcessDefinitionKey(long value)
      Copy the current immutable object by setting a value for the processDefinitionKey attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for processDefinitionKey
      Returns:
      A modified copy of the this object
    • withProcessInstanceKey

      public final ImmutableProcessInstanceResultRecordValue withProcessInstanceKey(long value)
      Copy the current immutable object by setting a value for the processInstanceKey attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for processInstanceKey
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableProcessInstanceResultRecordValue that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Returns a lazily computed hash code from attributes: variables, bpmnProcessId, version, processDefinitionKey, processInstanceKey.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value ProcessInstanceResultRecordValue with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      Creates an immutable copy of a ProcessInstanceResultRecordValue value. 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 for ImmutableProcessInstanceResultRecordValue.
       ImmutableProcessInstanceResultRecordValue.builder()
          .putVariable|putAllVariables(String => Object) // variables mappings
          .withBpmnProcessId(String | null) // nullable bpmnProcessId
          .withVersion(int) // optional version
          .withProcessDefinitionKey(long) // optional processDefinitionKey
          .withProcessInstanceKey(long) // optional processInstanceKey
          .build();
       
      Returns:
      A new ImmutableProcessInstanceResultRecordValue builder