Class ImmutableProcessInstanceCreationRecordValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableProcessInstanceCreationRecordValue
- All Implemented Interfaces:
JsonSerializable,RecordValue,RecordValueWithVariables,ProcessInstanceCreationRecordValue,ProcessInstanceRelated,TenantOwned
public final class ImmutableProcessInstanceCreationRecordValue
extends Object
implements ProcessInstanceCreationRecordValue
Immutable implementation of
ProcessInstanceCreationRecordValue.
Use the builder to create immutable instances:
ImmutableProcessInstanceCreationRecordValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableProcessInstanceCreationRecordValue.Nested classes/interfaces inherited from interface io.camunda.zeebe.protocol.record.value.ProcessInstanceCreationRecordValue
ProcessInstanceCreationRecordValue.ProcessInstanceCreationStartInstructionValue -
Field Summary
Fields inherited from interface io.camunda.zeebe.protocol.record.value.TenantOwned
DEFAULT_TENANT_IDENTIFIER -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableProcessInstanceCreationRecordValue.copyOf(ProcessInstanceCreationRecordValue instance) Creates an immutable copy of aProcessInstanceCreationRecordValuevalue.booleanThis instance is equal to all instances ofImmutableProcessInstanceCreationRecordValuethat have equal attribute values.longlongReturns a list of start instructions (if available), or an empty list.Returns the identifier of the tenant that owns this entity.intinthashCode()Returns a lazily computed hash code from attributes:variables,processInstanceKey,tenantId,bpmnProcessId,version,processDefinitionKey,startInstructions.toString()Prints the immutable valueProcessInstanceCreationRecordValuewith 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.withStartInstructions(ProcessInstanceCreationRecordValue.ProcessInstanceCreationStartInstructionValue... elements) Copy the current immutable object with elements that replace the content ofstartInstructions.withStartInstructions(Iterable<? extends ProcessInstanceCreationRecordValue.ProcessInstanceCreationStartInstructionValue> elements) Copy the current immutable object with elements that replace the content ofstartInstructions.withTenantId(String value) Copy the current immutable object by setting a value for thetenantIdattribute.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.
-
getProcessInstanceKey
public long getProcessInstanceKey()- Specified by:
getProcessInstanceKeyin interfaceProcessInstanceRelated- Returns:
- the key of the corresponding process instance
-
getTenantId
Returns the identifier of the tenant that owns this entity.- Specified by:
getTenantIdin interfaceTenantOwned
-
getBpmnProcessId
- Specified by:
getBpmnProcessIdin interfaceProcessInstanceCreationRecordValue- Returns:
- the BPMN process id to create a process from
-
getVersion
public int getVersion()- Specified by:
getVersionin interfaceProcessInstanceCreationRecordValue- Returns:
- the version of the BPMN process to create a process from
-
getProcessDefinitionKey
public long getProcessDefinitionKey()- Specified by:
getProcessDefinitionKeyin interfaceProcessInstanceCreationRecordValue- Returns:
- the unique key of the BPMN process definition to create a process from
-
getStartInstructions
public List<ProcessInstanceCreationRecordValue.ProcessInstanceCreationStartInstructionValue> getStartInstructions()Returns a list of start instructions (if available), or an empty list.- Specified by:
getStartInstructionsin interfaceProcessInstanceCreationRecordValue
-
withVariables
public final ImmutableProcessInstanceCreationRecordValue 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
-
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
-
withTenantId
Copy the current immutable object by setting a value for thetenantIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for tenantId (can benull)- Returns:
- A modified copy of the
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
-
withStartInstructions
public final ImmutableProcessInstanceCreationRecordValue withStartInstructions(ProcessInstanceCreationRecordValue.ProcessInstanceCreationStartInstructionValue... elements) Copy the current immutable object with elements that replace the content ofstartInstructions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withStartInstructions
public final ImmutableProcessInstanceCreationRecordValue withStartInstructions(Iterable<? extends ProcessInstanceCreationRecordValue.ProcessInstanceCreationStartInstructionValue> elements) Copy the current immutable object with elements that replace the content ofstartInstructions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of startInstructions elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableProcessInstanceCreationRecordValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:variables,processInstanceKey,tenantId,bpmnProcessId,version,processDefinitionKey,startInstructions. -
toString
Prints the immutable valueProcessInstanceCreationRecordValuewith attribute values. -
copyOf
public static ImmutableProcessInstanceCreationRecordValue copyOf(ProcessInstanceCreationRecordValue instance) Creates an immutable copy of aProcessInstanceCreationRecordValuevalue. 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 ProcessInstanceCreationRecordValue instance
-
builder
Creates a builder forImmutableProcessInstanceCreationRecordValue.ImmutableProcessInstanceCreationRecordValue.builder() .putVariable|putAllVariables(String => Object) //variablesmappings .withProcessInstanceKey(long) // optionalprocessInstanceKey.withTenantId(String | null) // nullabletenantId.withBpmnProcessId(String | null) // nullablebpmnProcessId.withVersion(int) // optionalversion.withProcessDefinitionKey(long) // optionalprocessDefinitionKey.addStartInstruction|addAllStartInstructions(io.camunda.zeebe.protocol.record.value.ProcessInstanceCreationRecordValue.ProcessInstanceCreationStartInstructionValue) //startInstructionselements .build();- Returns:
- A new ImmutableProcessInstanceCreationRecordValue builder
-