Class ImmutableVariableDocumentRecordValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableVariableDocumentRecordValue
- All Implemented Interfaces:
JsonSerializable,RecordValue,RecordValueWithVariables,TenantOwned,VariableDocumentRecordValue
public final class ImmutableVariableDocumentRecordValue
extends Object
implements VariableDocumentRecordValue
Immutable implementation of
VariableDocumentRecordValue.
Use the builder to create immutable instances:
ImmutableVariableDocumentRecordValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableVariableDocumentRecordValue. -
Field Summary
Fields inherited from interface io.camunda.zeebe.protocol.record.value.TenantOwned
DEFAULT_TENANT_IDENTIFIER -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableVariableDocumentRecordValue.copyOf(VariableDocumentRecordValue instance) Creates an immutable copy of aVariableDocumentRecordValuevalue.booleanThis instance is equal to all instances ofImmutableVariableDocumentRecordValuethat have equal attribute values.longReturns the identifier of the tenant that owns this entity.inthashCode()Returns a lazily computed hash code from attributes:variables,tenantId,scopeKey,updateSemantics.toString()Prints the immutable valueVariableDocumentRecordValuewith attribute values.withScopeKey(long value) Copy the current immutable object by setting a value for thescopeKeyattribute.withTenantId(String value) Copy the current immutable object by setting a value for thetenantIdattribute.Copy the current immutable object by setting a value for theupdateSemanticsattribute.withVariables(Map<String, ? extends Object> entries) Copy the current immutable object by replacing thevariablesmap with the specified map.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.
-
getTenantId
Returns the identifier of the tenant that owns this entity.- Specified by:
getTenantIdin interfaceTenantOwned
-
getScopeKey
public long getScopeKey()- Specified by:
getScopeKeyin interfaceVariableDocumentRecordValue- Returns:
- the scope key associated with the variable document
-
getUpdateSemantics
- Specified by:
getUpdateSemanticsin interfaceVariableDocumentRecordValue- Returns:
- the semantic of how this variable document is applied, see
VariableDocumentUpdateSemantic
-
withVariables
public final ImmutableVariableDocumentRecordValue 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
-
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
-
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
-
withUpdateSemantics
public final ImmutableVariableDocumentRecordValue withUpdateSemantics(VariableDocumentUpdateSemantic value) Copy the current immutable object by setting a value for theupdateSemanticsattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for updateSemantics (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableVariableDocumentRecordValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:variables,tenantId,scopeKey,updateSemantics. -
toString
Prints the immutable valueVariableDocumentRecordValuewith attribute values. -
copyOf
Creates an immutable copy of aVariableDocumentRecordValuevalue. 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 VariableDocumentRecordValue instance
-
builder
Creates a builder forImmutableVariableDocumentRecordValue.ImmutableVariableDocumentRecordValue.builder() .putVariable|putAllVariables(String => Object) //variablesmappings .withTenantId(String | null) // nullabletenantId.withScopeKey(long) // optionalscopeKey.withUpdateSemantics(io.camunda.zeebe.protocol.record.value.VariableDocumentUpdateSemantic | null) // nullableupdateSemantics.build();- Returns:
- A new ImmutableVariableDocumentRecordValue builder
-