Class ImmutableProcessInstanceRecordValue

java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableProcessInstanceRecordValue
All Implemented Interfaces:
JsonSerializable, RecordValue, ProcessInstanceRecordValue, ProcessInstanceRelated, TenantOwned

public final class ImmutableProcessInstanceRecordValue extends Object implements ProcessInstanceRecordValue
Immutable implementation of ProcessInstanceRecordValue.

Use the builder to create immutable instances: ImmutableProcessInstanceRecordValue.builder().

  • Method Details

    • getTenantId

      public String getTenantId()
      Returns the identifier of the tenant that owns this entity.
      Specified by:
      getTenantId in interface TenantOwned
    • getBpmnProcessId

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

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

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

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

      public String getElementId()
      Specified by:
      getElementId in interface ProcessInstanceRecordValue
      Returns:
      the id of the current process element, or empty if the id is not specified.
    • getFlowScopeKey

      public long getFlowScopeKey()
      Specified by:
      getFlowScopeKey in interface ProcessInstanceRecordValue
      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

      public BpmnElementType getBpmnElementType()
      Specified by:
      getBpmnElementType in interface ProcessInstanceRecordValue
      Returns:
      the BPMN type of the current process element.
    • getParentProcessInstanceKey

      public long getParentProcessInstanceKey()
      Specified by:
      getParentProcessInstanceKey in interface ProcessInstanceRecordValue
      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:
      getParentElementInstanceKey in interface ProcessInstanceRecordValue
      Returns:
      the key of the element instance that created this instance, or -1 if it was not created by another process instance.
    • getBpmnEventType

      public BpmnEventType getBpmnEventType()
      Specified by:
      getBpmnEventType in interface ProcessInstanceRecordValue
      Returns:
      the BPMN event type of the current process element.
    • withTenantId

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

      public final ImmutableProcessInstanceRecordValue 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 ImmutableProcessInstanceRecordValue 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 ImmutableProcessInstanceRecordValue 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 ImmutableProcessInstanceRecordValue 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
    • withElementId

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

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

      public final ImmutableProcessInstanceRecordValue withBpmnElementType(BpmnElementType value)
      Copy the current immutable object by setting a value for the bpmnElementType attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for bpmnElementType (can be null)
      Returns:
      A modified copy of the this object
    • withParentProcessInstanceKey

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

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

      public final ImmutableProcessInstanceRecordValue withBpmnEventType(BpmnEventType value)
      Copy the current immutable object by setting a value for the bpmnEventType attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for bpmnEventType (can be null)
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(Object another)
      This instance is equal to all instances of ImmutableProcessInstanceRecordValue 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: tenantId, bpmnProcessId, version, processDefinitionKey, processInstanceKey, elementId, flowScopeKey, bpmnElementType, parentProcessInstanceKey, parentElementInstanceKey, bpmnEventType.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      Creates an immutable copy of a ProcessInstanceRecordValue 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 ProcessInstanceRecordValue instance
    • builder

      Creates a builder for ImmutableProcessInstanceRecordValue.
       ImmutableProcessInstanceRecordValue.builder()
          .withTenantId(String | null) // nullable tenantId
          .withBpmnProcessId(String | null) // nullable bpmnProcessId
          .withVersion(int) // optional version
          .withProcessDefinitionKey(long) // optional processDefinitionKey
          .withProcessInstanceKey(long) // optional processInstanceKey
          .withElementId(String | null) // nullable elementId
          .withFlowScopeKey(long) // optional flowScopeKey
          .withBpmnElementType(io.camunda.zeebe.protocol.record.value.BpmnElementType | null) // nullable bpmnElementType
          .withParentProcessInstanceKey(long) // optional parentProcessInstanceKey
          .withParentElementInstanceKey(long) // optional parentElementInstanceKey
          .withBpmnEventType(io.camunda.zeebe.protocol.record.value.BpmnEventType | null) // nullable bpmnEventType
          .build();
       
      Returns:
      A new ImmutableProcessInstanceRecordValue builder