Class ImmutableProcessInstanceMigrationRecordValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableProcessInstanceMigrationRecordValue
- All Implemented Interfaces:
JsonSerializable,RecordValue,ProcessInstanceMigrationRecordValue,ProcessInstanceRelated
public final class ImmutableProcessInstanceMigrationRecordValue
extends Object
implements ProcessInstanceMigrationRecordValue
Immutable implementation of
ProcessInstanceMigrationRecordValue.
Use the builder to create immutable instances:
ImmutableProcessInstanceMigrationRecordValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableProcessInstanceMigrationRecordValue.Nested classes/interfaces inherited from interface io.camunda.zeebe.protocol.record.value.ProcessInstanceMigrationRecordValue
ProcessInstanceMigrationRecordValue.ProcessInstanceMigrationMappingInstructionValue -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableProcessInstanceMigrationRecordValue.copyOf(ProcessInstanceMigrationRecordValue instance) Creates an immutable copy of aProcessInstanceMigrationRecordValuevalue.booleanThis instance is equal to all instances ofImmutableProcessInstanceMigrationRecordValuethat have equal attribute values.longlonginthashCode()Returns a lazily computed hash code from attributes:processInstanceKey,targetProcessDefinitionKey,mappingInstructions.toString()Prints the immutable valueProcessInstanceMigrationRecordValuewith attribute values.withMappingInstructions(ProcessInstanceMigrationRecordValue.ProcessInstanceMigrationMappingInstructionValue... elements) Copy the current immutable object with elements that replace the content ofmappingInstructions.withMappingInstructions(Iterable<? extends ProcessInstanceMigrationRecordValue.ProcessInstanceMigrationMappingInstructionValue> elements) Copy the current immutable object with elements that replace the content ofmappingInstructions.withProcessInstanceKey(long value) Copy the current immutable object by setting a value for theprocessInstanceKeyattribute.withTargetProcessDefinitionKey(long value) Copy the current immutable object by setting a value for thetargetProcessDefinitionKeyattribute.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
-
getTargetProcessDefinitionKey
public long getTargetProcessDefinitionKey()- Specified by:
getTargetProcessDefinitionKeyin interfaceProcessInstanceMigrationRecordValue- Returns:
- the key of the process definition to migrate to
-
getMappingInstructions
public List<ProcessInstanceMigrationRecordValue.ProcessInstanceMigrationMappingInstructionValue> getMappingInstructions()- Specified by:
getMappingInstructionsin interfaceProcessInstanceMigrationRecordValue- Returns:
- the mapping instructions, or an empty list if no instructions are available
-
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
-
withTargetProcessDefinitionKey
public final ImmutableProcessInstanceMigrationRecordValue withTargetProcessDefinitionKey(long value) Copy the current immutable object by setting a value for thetargetProcessDefinitionKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for targetProcessDefinitionKey- Returns:
- A modified copy of the
thisobject
-
withMappingInstructions
public final ImmutableProcessInstanceMigrationRecordValue withMappingInstructions(ProcessInstanceMigrationRecordValue.ProcessInstanceMigrationMappingInstructionValue... elements) Copy the current immutable object with elements that replace the content ofmappingInstructions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withMappingInstructions
public final ImmutableProcessInstanceMigrationRecordValue withMappingInstructions(Iterable<? extends ProcessInstanceMigrationRecordValue.ProcessInstanceMigrationMappingInstructionValue> elements) Copy the current immutable object with elements that replace the content ofmappingInstructions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of mappingInstructions elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableProcessInstanceMigrationRecordValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:processInstanceKey,targetProcessDefinitionKey,mappingInstructions. -
toString
Prints the immutable valueProcessInstanceMigrationRecordValuewith attribute values. -
copyOf
public static ImmutableProcessInstanceMigrationRecordValue copyOf(ProcessInstanceMigrationRecordValue instance) Creates an immutable copy of aProcessInstanceMigrationRecordValuevalue. 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 ProcessInstanceMigrationRecordValue instance
-
builder
Creates a builder forImmutableProcessInstanceMigrationRecordValue.ImmutableProcessInstanceMigrationRecordValue.builder() .withProcessInstanceKey(long) // optionalprocessInstanceKey.withTargetProcessDefinitionKey(long) // optionaltargetProcessDefinitionKey.addMappingInstruction|addAllMappingInstructions(io.camunda.zeebe.protocol.record.value.ProcessInstanceMigrationRecordValue.ProcessInstanceMigrationMappingInstructionValue) //mappingInstructionselements .build();- Returns:
- A new ImmutableProcessInstanceMigrationRecordValue builder
-