Class ImmutableIncidentRecordValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableIncidentRecordValue
- All Implemented Interfaces:
JsonSerializable,RecordValue,IncidentRecordValue,ProcessInstanceRelated
@ParametersAreNonnullByDefault
@Immutable
public final class ImmutableIncidentRecordValue
extends Object
implements IncidentRecordValue
Immutable implementation of
IncidentRecordValue.
Use the builder to create immutable instances:
ImmutableIncidentRecordValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableIncidentRecordValue. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableIncidentRecordValue.static ImmutableIncidentRecordValuecopyOf(IncidentRecordValue instance) Creates an immutable copy of aIncidentRecordValuevalue.booleanThis instance is equal to all instances ofImmutableIncidentRecordValuethat have equal attribute values.longlonglonglonglonginthashCode()Returns a lazily computed hash code from attributes:errorType,errorMessage,bpmnProcessId,processDefinitionKey,processInstanceKey,elementId,elementInstanceKey,jobKey,variableScopeKey.toString()Prints the immutable valueIncidentRecordValuewith attribute values.withBpmnProcessId(String value) Copy the current immutable object by setting a value for thebpmnProcessIdattribute.withElementId(String value) Copy the current immutable object by setting a value for theelementIdattribute.withElementInstanceKey(long value) Copy the current immutable object by setting a value for theelementInstanceKeyattribute.withErrorMessage(String value) Copy the current immutable object by setting a value for theerrorMessageattribute.withErrorType(ErrorType value) Copy the current immutable object by setting a value for theerrorTypeattribute.withJobKey(long value) Copy the current immutable object by setting a value for thejobKeyattribute.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.withVariableScopeKey(long value) Copy the current immutable object by setting a value for thevariableScopeKeyattribute.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
-
getErrorType
- Specified by:
getErrorTypein interfaceIncidentRecordValue- Returns:
- the type of error this incident is caused by. Can be
UNKNOWNif the incident record is part of aIncidentIntent#RESOLVEcommand.
-
getErrorMessage
- Specified by:
getErrorMessagein interfaceIncidentRecordValue- Returns:
- the description of the error this incident is caused by. Can be empty if the incident
record is part of a
IncidentIntent#RESOLVEcommand.
-
getBpmnProcessId
- Specified by:
getBpmnProcessIdin interfaceIncidentRecordValue- Returns:
- the BPMN process id this incident belongs to. Can be empty if the incident record is
part of a
IncidentIntent#RESOLVEcommand.
-
getProcessDefinitionKey
public long getProcessDefinitionKey()- Specified by:
getProcessDefinitionKeyin interfaceIncidentRecordValue- Returns:
- the key of the process this incident belongs to. Can be
-1if the incident record is part of aIncidentIntent#RESOLVEcommand.
-
getProcessInstanceKey
public long getProcessInstanceKey()- Specified by:
getProcessInstanceKeyin interfaceIncidentRecordValue- Specified by:
getProcessInstanceKeyin interfaceProcessInstanceRelated- Returns:
- the key of the process instance this incident belongs to. Can be
-1if the incident record is part of aIncidentIntent#RESOLVEcommand.
-
getElementId
- Specified by:
getElementIdin interfaceIncidentRecordValue- Returns:
- the id of the element this incident belongs to. Can be empty if incident record is part
of a
IncidentIntent#RESOLVEcommand.
-
getElementInstanceKey
public long getElementInstanceKey()- Specified by:
getElementInstanceKeyin interfaceIncidentRecordValue- Returns:
- the key of the element instance this incident belongs to. Can be
-1if the incident record is part of aIncidentIntent#RESOLVEcommand.
-
getJobKey
public long getJobKey()- Specified by:
getJobKeyin interfaceIncidentRecordValue- Returns:
- the key of the job this incident belongs to. Can be
-1if the incident belongs to no job or the incident record is part of aIncidentIntent#RESOLVEcommand.
-
getVariableScopeKey
public long getVariableScopeKey()- Specified by:
getVariableScopeKeyin interfaceIncidentRecordValue- Returns:
- the key of the variable scope on which the variables need to be updated. Can be
-1if the incident record is part of aIncidentIntent#RESOLVEcommand.
-
withErrorType
Copy the current immutable object by setting a value for theerrorTypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for errorType (can benull)- Returns:
- A modified copy of the
thisobject
-
withErrorMessage
Copy the current immutable object by setting a value for theerrorMessageattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for errorMessage (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
-
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
-
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
-
withElementId
Copy the current immutable object by setting a value for theelementIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for elementId (can benull)- Returns:
- A modified copy of the
thisobject
-
withElementInstanceKey
Copy the current immutable object by setting a value for theelementInstanceKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for elementInstanceKey- Returns:
- A modified copy of the
thisobject
-
withJobKey
Copy the current immutable object by setting a value for thejobKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for jobKey- Returns:
- A modified copy of the
thisobject
-
withVariableScopeKey
Copy the current immutable object by setting a value for thevariableScopeKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for variableScopeKey- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableIncidentRecordValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:errorType,errorMessage,bpmnProcessId,processDefinitionKey,processInstanceKey,elementId,elementInstanceKey,jobKey,variableScopeKey. -
toString
Prints the immutable valueIncidentRecordValuewith attribute values. -
copyOf
Creates an immutable copy of aIncidentRecordValuevalue. 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 IncidentRecordValue instance
-
builder
Creates a builder forImmutableIncidentRecordValue.ImmutableIncidentRecordValue.builder() .withErrorType(io.camunda.zeebe.protocol.record.value.ErrorType | null) // nullableerrorType.withErrorMessage(String | null) // nullableerrorMessage.withBpmnProcessId(String | null) // nullablebpmnProcessId.withProcessDefinitionKey(long) // optionalprocessDefinitionKey.withProcessInstanceKey(long) // optionalprocessInstanceKey.withElementId(String | null) // nullableelementId.withElementInstanceKey(long) // optionalelementInstanceKey.withJobKey(long) // optionaljobKey.withVariableScopeKey(long) // optionalvariableScopeKey.build();- Returns:
- A new ImmutableIncidentRecordValue builder
-