Class ImmutableVariableRecordValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableVariableRecordValue
- All Implemented Interfaces:
JsonSerializable,RecordValue,ProcessInstanceRelated,VariableRecordValue
@ParametersAreNonnullByDefault
@Immutable
public final class ImmutableVariableRecordValue
extends Object
implements VariableRecordValue
Immutable implementation of
VariableRecordValue.
Use the builder to create immutable instances:
ImmutableVariableRecordValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableVariableRecordValue. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableVariableRecordValue.static ImmutableVariableRecordValuecopyOf(VariableRecordValue instance) Creates an immutable copy of aVariableRecordValuevalue.booleanThis instance is equal to all instances ofImmutableVariableRecordValuethat have equal attribute values.getName()longlonglonggetValue()inthashCode()Returns a lazily computed hash code from attributes:name,value,scopeKey,processInstanceKey,processDefinitionKey,bpmnProcessId.toString()Prints the immutable valueVariableRecordValuewith attribute values.withBpmnProcessId(String value) Copy the current immutable object by setting a value for thebpmnProcessIdattribute.Copy the current immutable object by setting a value for thenameattribute.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.withScopeKey(long value) Copy the current immutable object by setting a value for thescopeKeyattribute.Copy the current immutable object by setting a value for thevalueattribute.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
-
getName
- Specified by:
getNamein interfaceVariableRecordValue- Returns:
- the name of the variable.
-
getValue
- Specified by:
getValuein interfaceVariableRecordValue- Returns:
- the value of the variable as JSON string.
-
getScopeKey
public long getScopeKey()- Specified by:
getScopeKeyin interfaceVariableRecordValue- Returns:
- the key of the scope the variable belongs to.
-
getProcessInstanceKey
public long getProcessInstanceKey()- Specified by:
getProcessInstanceKeyin interfaceProcessInstanceRelated- Specified by:
getProcessInstanceKeyin interfaceVariableRecordValue- Returns:
- the key of the process instance the variable belongs to
-
getProcessDefinitionKey
public long getProcessDefinitionKey()- Specified by:
getProcessDefinitionKeyin interfaceVariableRecordValue- Returns:
- the key of the process the variable belongs to
-
getBpmnProcessId
- Specified by:
getBpmnProcessIdin interfaceVariableRecordValue- Returns:
- the BPMN process id this process instance belongs to.
-
withName
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name (can benull)- Returns:
- A modified copy of the
thisobject
-
withValue
Copy the current immutable object by setting a value for thevalueattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for value (can benull)- Returns:
- A modified copy of the
thisobject
-
withScopeKey
Copy the current immutable object by setting a value for thescopeKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for scopeKey- Returns:
- A modified copy of the
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
-
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
-
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
-
equals
This instance is equal to all instances ofImmutableVariableRecordValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:name,value,scopeKey,processInstanceKey,processDefinitionKey,bpmnProcessId. -
toString
Prints the immutable valueVariableRecordValuewith attribute values. -
copyOf
Creates an immutable copy of aVariableRecordValuevalue. 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 VariableRecordValue instance
-
builder
Creates a builder forImmutableVariableRecordValue.ImmutableVariableRecordValue.builder() .withName(String | null) // nullablename.withValue(String | null) // nullablevalue.withScopeKey(long) // optionalscopeKey.withProcessInstanceKey(long) // optionalprocessInstanceKey.withProcessDefinitionKey(long) // optionalprocessDefinitionKey.withBpmnProcessId(String | null) // nullablebpmnProcessId.build();- Returns:
- A new ImmutableVariableRecordValue builder
-