Class ImmutableEvaluatedDecisionValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.ImmutableEvaluatedDecisionValue
- All Implemented Interfaces:
JsonSerializable,RecordValue,EvaluatedDecisionValue,TenantOwned
Immutable implementation of
EvaluatedDecisionValue.
Use the builder to create immutable instances:
ImmutableEvaluatedDecisionValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableEvaluatedDecisionValue. -
Field Summary
Fields inherited from interface io.camunda.zeebe.protocol.record.value.TenantOwned
DEFAULT_TENANT_IDENTIFIER -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableEvaluatedDecisionValue.copyOf(EvaluatedDecisionValue instance) Creates an immutable copy of aEvaluatedDecisionValuevalue.booleanThis instance is equal to all instances ofImmutableEvaluatedDecisionValuethat have equal attribute values.longintIf the decision is a decision table then it returns theevaluated inputs.If the decision is a decision table then it returns the matched rules.Returns the identifier of the tenant that owns this entity.inthashCode()Returns a lazily computed hash code from attributes:tenantId,decisionId,decisionName,decisionKey,decisionVersion,decisionType,decisionOutput,evaluatedInputs,matchedRules.toString()Prints the immutable valueEvaluatedDecisionValuewith attribute values.withDecisionId(String value) Copy the current immutable object by setting a value for thedecisionIdattribute.withDecisionKey(long value) Copy the current immutable object by setting a value for thedecisionKeyattribute.withDecisionName(String value) Copy the current immutable object by setting a value for thedecisionNameattribute.withDecisionOutput(String value) Copy the current immutable object by setting a value for thedecisionOutputattribute.withDecisionType(String value) Copy the current immutable object by setting a value for thedecisionTypeattribute.withDecisionVersion(int value) Copy the current immutable object by setting a value for thedecisionVersionattribute.withEvaluatedInputs(EvaluatedInputValue... elements) Copy the current immutable object with elements that replace the content ofevaluatedInputs.withEvaluatedInputs(Iterable<? extends EvaluatedInputValue> elements) Copy the current immutable object with elements that replace the content ofevaluatedInputs.withMatchedRules(MatchedRuleValue... elements) Copy the current immutable object with elements that replace the content ofmatchedRules.withMatchedRules(Iterable<? extends MatchedRuleValue> elements) Copy the current immutable object with elements that replace the content ofmatchedRules.withTenantId(String value) Copy the current immutable object by setting a value for thetenantIdattribute.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
-
getTenantId
Returns the identifier of the tenant that owns this entity.- Specified by:
getTenantIdin interfaceTenantOwned
-
getDecisionId
- Specified by:
getDecisionIdin interfaceEvaluatedDecisionValue- Returns:
- the id of the evaluated decision
-
getDecisionName
- Specified by:
getDecisionNamein interfaceEvaluatedDecisionValue- Returns:
- the name of the evaluated decision
-
getDecisionKey
public long getDecisionKey()- Specified by:
getDecisionKeyin interfaceEvaluatedDecisionValue- Returns:
- the key of the evaluated decision
-
getDecisionVersion
public int getDecisionVersion()- Specified by:
getDecisionVersionin interfaceEvaluatedDecisionValue- Returns:
- the version of the evaluated decision
-
getDecisionType
- Specified by:
getDecisionTypein interfaceEvaluatedDecisionValue- Returns:
- the type of the evaluated decision
-
getDecisionOutput
- Specified by:
getDecisionOutputin interfaceEvaluatedDecisionValue- Returns:
- the output of the evaluated decision as JSON string
-
getEvaluatedInputs
If the decision is a decision table then it returns theevaluated inputs. The inputs are not available for other types of decision.- Specified by:
getEvaluatedInputsin interfaceEvaluatedDecisionValue- Returns:
- the evaluated inputs, or an empty list if the decision is not a decision table
-
getMatchedRules
If the decision is a decision table then it returns the matched rules. Thematched rulesare not available for other types of decision.- Specified by:
getMatchedRulesin interfaceEvaluatedDecisionValue- Returns:
- the matched rules, or an empty list if the decision is not a decision table
-
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
-
withDecisionId
Copy the current immutable object by setting a value for thedecisionIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for decisionId (can benull)- Returns:
- A modified copy of the
thisobject
-
withDecisionName
Copy the current immutable object by setting a value for thedecisionNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for decisionName (can benull)- Returns:
- A modified copy of the
thisobject
-
withDecisionKey
Copy the current immutable object by setting a value for thedecisionKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for decisionKey- Returns:
- A modified copy of the
thisobject
-
withDecisionVersion
Copy the current immutable object by setting a value for thedecisionVersionattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for decisionVersion- Returns:
- A modified copy of the
thisobject
-
withDecisionType
Copy the current immutable object by setting a value for thedecisionTypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for decisionType (can benull)- Returns:
- A modified copy of the
thisobject
-
withDecisionOutput
Copy the current immutable object by setting a value for thedecisionOutputattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for decisionOutput (can benull)- Returns:
- A modified copy of the
thisobject
-
withEvaluatedInputs
Copy the current immutable object with elements that replace the content ofevaluatedInputs.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withEvaluatedInputs
public final ImmutableEvaluatedDecisionValue withEvaluatedInputs(Iterable<? extends EvaluatedInputValue> elements) Copy the current immutable object with elements that replace the content ofevaluatedInputs. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of evaluatedInputs elements to set- Returns:
- A modified copy of
thisobject
-
withMatchedRules
Copy the current immutable object with elements that replace the content ofmatchedRules.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withMatchedRules
public final ImmutableEvaluatedDecisionValue withMatchedRules(Iterable<? extends MatchedRuleValue> elements) Copy the current immutable object with elements that replace the content ofmatchedRules. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of matchedRules elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableEvaluatedDecisionValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:tenantId,decisionId,decisionName,decisionKey,decisionVersion,decisionType,decisionOutput,evaluatedInputs,matchedRules. -
toString
Prints the immutable valueEvaluatedDecisionValuewith attribute values. -
copyOf
Creates an immutable copy of aEvaluatedDecisionValuevalue. 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 EvaluatedDecisionValue instance
-
builder
Creates a builder forImmutableEvaluatedDecisionValue.ImmutableEvaluatedDecisionValue.builder() .withTenantId(String | null) // nullabletenantId.withDecisionId(String | null) // nullabledecisionId.withDecisionName(String | null) // nullabledecisionName.withDecisionKey(long) // optionaldecisionKey.withDecisionVersion(int) // optionaldecisionVersion.withDecisionType(String | null) // nullabledecisionType.withDecisionOutput(String | null) // nullabledecisionOutput.addEvaluatedInput|addAllEvaluatedInputs(io.camunda.zeebe.protocol.record.value.EvaluatedInputValue) //evaluatedInputselements .addMatchedRule|addAllMatchedRules(io.camunda.zeebe.protocol.record.value.MatchedRuleValue) //matchedRuleselements .build();- Returns:
- A new ImmutableEvaluatedDecisionValue builder
-