Class ImmutableDecisionRecordValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.deployment.ImmutableDecisionRecordValue
- All Implemented Interfaces:
JsonSerializable,RecordValue,DecisionRecordValue
@ParametersAreNonnullByDefault
@Immutable
public final class ImmutableDecisionRecordValue
extends Object
implements DecisionRecordValue
Immutable implementation of
DecisionRecordValue.
Use the builder to create immutable instances:
ImmutableDecisionRecordValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableDecisionRecordValue. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableDecisionRecordValue.static ImmutableDecisionRecordValuecopyOf(DecisionRecordValue instance) Creates an immutable copy of aDecisionRecordValuevalue.booleanThis instance is equal to all instances ofImmutableDecisionRecordValuethat have equal attribute values.longlongintinthashCode()Returns a lazily computed hash code from attributes:decisionId,decisionName,version,decisionKey,decisionRequirementsId,decisionRequirementsKey,duplicate.booleantoString()Prints the immutable valueDecisionRecordValuewith 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.withDecisionRequirementsId(String value) Copy the current immutable object by setting a value for thedecisionRequirementsIdattribute.withDecisionRequirementsKey(long value) Copy the current immutable object by setting a value for thedecisionRequirementsKeyattribute.withDuplicate(boolean value) Copy the current immutable object by setting a value for theduplicateattribute.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
-
getDecisionId
- Specified by:
getDecisionIdin interfaceDecisionRecordValue- Returns:
- the ID of the decision in the DMN
-
getDecisionName
- Specified by:
getDecisionNamein interfaceDecisionRecordValue- Returns:
- the name of the decision in the DMN
-
getVersion
public int getVersion()- Specified by:
getVersionin interfaceDecisionRecordValue- Returns:
- the version of the deployed decision
-
getDecisionKey
public long getDecisionKey()- Specified by:
getDecisionKeyin interfaceDecisionRecordValue- Returns:
- the key of the deployed decision
-
getDecisionRequirementsId
- Specified by:
getDecisionRequirementsIdin interfaceDecisionRecordValue- Returns:
- the ID of the DRG in the DMN this decision belongs to
-
getDecisionRequirementsKey
public long getDecisionRequirementsKey()- Specified by:
getDecisionRequirementsKeyin interfaceDecisionRecordValue- Returns:
- the key of the deployed DRG this decision belongs to
-
isDuplicate
public boolean isDuplicate()- Specified by:
isDuplicatein interfaceDecisionRecordValue- Returns:
trueif the decision is a duplicate (and has been deployed previously), otherwisefalse
-
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
-
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
-
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
-
withDecisionRequirementsId
Copy the current immutable object by setting a value for thedecisionRequirementsIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for decisionRequirementsId (can benull)- Returns:
- A modified copy of the
thisobject
-
withDecisionRequirementsKey
Copy the current immutable object by setting a value for thedecisionRequirementsKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for decisionRequirementsKey- Returns:
- A modified copy of the
thisobject
-
withDuplicate
Copy the current immutable object by setting a value for theduplicateattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for duplicate- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableDecisionRecordValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:decisionId,decisionName,version,decisionKey,decisionRequirementsId,decisionRequirementsKey,duplicate. -
toString
Prints the immutable valueDecisionRecordValuewith attribute values. -
copyOf
Creates an immutable copy of aDecisionRecordValuevalue. 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 DecisionRecordValue instance
-
builder
Creates a builder forImmutableDecisionRecordValue.ImmutableDecisionRecordValue.builder() .withDecisionId(String | null) // nullabledecisionId.withDecisionName(String | null) // nullabledecisionName.withVersion(int) // optionalversion.withDecisionKey(long) // optionaldecisionKey.withDecisionRequirementsId(String | null) // nullabledecisionRequirementsId.withDecisionRequirementsKey(long) // optionaldecisionRequirementsKey.withDuplicate(boolean) // optionalduplicate.build();- Returns:
- A new ImmutableDecisionRecordValue builder
-