Class ImmutableProcessInstanceModificationRecordValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableProcessInstanceModificationRecordValue
- All Implemented Interfaces:
JsonSerializable,RecordValue,ProcessInstanceModificationRecordValue,ProcessInstanceRelated
@ParametersAreNonnullByDefault
@Immutable
public final class ImmutableProcessInstanceModificationRecordValue
extends Object
implements ProcessInstanceModificationRecordValue
Immutable implementation of
ProcessInstanceModificationRecordValue.
Use the builder to create immutable instances:
ImmutableProcessInstanceModificationRecordValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableProcessInstanceModificationRecordValue.Nested classes/interfaces inherited from interface io.camunda.zeebe.protocol.record.value.ProcessInstanceModificationRecordValue
ProcessInstanceModificationRecordValue.ProcessInstanceModificationActivateInstructionValue, ProcessInstanceModificationRecordValue.ProcessInstanceModificationTerminateInstructionValue, ProcessInstanceModificationRecordValue.ProcessInstanceModificationVariableInstructionValue -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableProcessInstanceModificationRecordValue.copyOf(ProcessInstanceModificationRecordValue instance) Creates an immutable copy of aProcessInstanceModificationRecordValuevalue.booleanThis instance is equal to all instances ofImmutableProcessInstanceModificationRecordValuethat have equal attribute values.Returns a list of activate instructions (if available), or an empty list.Deprecated.longReturns a list of terminate instructions (if available), or an empty list.inthashCode()Returns a lazily computed hash code from attributes:processInstanceKey,terminateInstructions,activateInstructions,ancestorScopeKeys.toString()Prints the immutable valueProcessInstanceModificationRecordValuewith attribute values.withActivateInstructions(ProcessInstanceModificationRecordValue.ProcessInstanceModificationActivateInstructionValue... elements) Copy the current immutable object with elements that replace the content ofactivateInstructions.withActivateInstructions(Iterable<? extends ProcessInstanceModificationRecordValue.ProcessInstanceModificationActivateInstructionValue> elements) Copy the current immutable object with elements that replace the content ofactivateInstructions.withAncestorScopeKeys(Iterable<? extends Long> elements) Deprecated.withAncestorScopeKeys(Long... elements) Deprecated.withProcessInstanceKey(long value) Copy the current immutable object by setting a value for theprocessInstanceKeyattribute.withTerminateInstructions(ProcessInstanceModificationRecordValue.ProcessInstanceModificationTerminateInstructionValue... elements) Copy the current immutable object with elements that replace the content ofterminateInstructions.withTerminateInstructions(Iterable<? extends ProcessInstanceModificationRecordValue.ProcessInstanceModificationTerminateInstructionValue> elements) Copy the current immutable object with elements that replace the content ofterminateInstructions.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
-
getProcessInstanceKey
public long getProcessInstanceKey()- Specified by:
getProcessInstanceKeyin interfaceProcessInstanceRelated- Returns:
- the key of the corresponding process instance
-
getTerminateInstructions
public List<ProcessInstanceModificationRecordValue.ProcessInstanceModificationTerminateInstructionValue> getTerminateInstructions()Returns a list of terminate instructions (if available), or an empty list.- Specified by:
getTerminateInstructionsin interfaceProcessInstanceModificationRecordValue
-
getActivateInstructions
public List<ProcessInstanceModificationRecordValue.ProcessInstanceModificationActivateInstructionValue> getActivateInstructions()Returns a list of activate instructions (if available), or an empty list.- Specified by:
getActivateInstructionsin interfaceProcessInstanceModificationRecordValue
-
getAncestorScopeKeys
Deprecated.Returns a list of all ancestor keys of all activate instructions. The property is set in the event only after the modification is applied.- Specified by:
getAncestorScopeKeysin interfaceProcessInstanceModificationRecordValue
-
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
-
withTerminateInstructions
public final ImmutableProcessInstanceModificationRecordValue withTerminateInstructions(ProcessInstanceModificationRecordValue.ProcessInstanceModificationTerminateInstructionValue... elements) Copy the current immutable object with elements that replace the content ofterminateInstructions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withTerminateInstructions
public final ImmutableProcessInstanceModificationRecordValue withTerminateInstructions(Iterable<? extends ProcessInstanceModificationRecordValue.ProcessInstanceModificationTerminateInstructionValue> elements) Copy the current immutable object with elements that replace the content ofterminateInstructions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of terminateInstructions elements to set- Returns:
- A modified copy of
thisobject
-
withActivateInstructions
public final ImmutableProcessInstanceModificationRecordValue withActivateInstructions(ProcessInstanceModificationRecordValue.ProcessInstanceModificationActivateInstructionValue... elements) Copy the current immutable object with elements that replace the content ofactivateInstructions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withActivateInstructions
public final ImmutableProcessInstanceModificationRecordValue withActivateInstructions(Iterable<? extends ProcessInstanceModificationRecordValue.ProcessInstanceModificationActivateInstructionValue> elements) Copy the current immutable object with elements that replace the content ofactivateInstructions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of activateInstructions elements to set- Returns:
- A modified copy of
thisobject
-
withAncestorScopeKeys
@Deprecated public final ImmutableProcessInstanceModificationRecordValue withAncestorScopeKeys(Long... elements) Deprecated.Copy the current immutable object with elements that replace the content ofancestorScopeKeys.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAncestorScopeKeys
@Deprecated public final ImmutableProcessInstanceModificationRecordValue withAncestorScopeKeys(Iterable<? extends Long> elements) Deprecated.Copy the current immutable object with elements that replace the content ofancestorScopeKeys. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of ancestorScopeKeys elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableProcessInstanceModificationRecordValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:processInstanceKey,terminateInstructions,activateInstructions,ancestorScopeKeys. -
toString
Prints the immutable valueProcessInstanceModificationRecordValuewith attribute values. -
copyOf
public static ImmutableProcessInstanceModificationRecordValue copyOf(ProcessInstanceModificationRecordValue instance) Creates an immutable copy of aProcessInstanceModificationRecordValuevalue. 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 ProcessInstanceModificationRecordValue instance
-
builder
Creates a builder forImmutableProcessInstanceModificationRecordValue.ImmutableProcessInstanceModificationRecordValue.builder() .withProcessInstanceKey(long) // optionalprocessInstanceKey.addTerminateInstruction|addAllTerminateInstructions(io.camunda.zeebe.protocol.record.value.ProcessInstanceModificationRecordValue.ProcessInstanceModificationTerminateInstructionValue) //terminateInstructionselements .addActivateInstruction|addAllActivateInstructions(io.camunda.zeebe.protocol.record.value.ProcessInstanceModificationRecordValue.ProcessInstanceModificationActivateInstructionValue) //activateInstructionselements .addAncestorScopeKey|addAllAncestorScopeKeys(Long) //ancestorScopeKeyselements .build();- Returns:
- A new ImmutableProcessInstanceModificationRecordValue builder
-
ProcessInstanceModificationRecordValue.ProcessInstanceModificationActivateInstructionValue.getAncestorScopeKeys()