Class ImmutableDecisionRequirementsMetadataValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.deployment.ImmutableDecisionRequirementsMetadataValue
- All Implemented Interfaces:
DecisionRequirementsMetadataValue
@ParametersAreNonnullByDefault
@Immutable
public final class ImmutableDecisionRequirementsMetadataValue
extends Object
implements DecisionRequirementsMetadataValue
Immutable implementation of
DecisionRequirementsMetadataValue
.
Use the builder to create immutable instances:
ImmutableDecisionRequirementsMetadataValue.builder()
.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Builds instances of typeImmutableDecisionRequirementsMetadataValue
. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Creates a builder forImmutableDecisionRequirementsMetadataValue
.copyOf
(DecisionRequirementsMetadataValue instance) Creates an immutable copy of aDecisionRequirementsMetadataValue
value.boolean
This instance is equal to all instances ofImmutableDecisionRequirementsMetadataValue
that have equal attribute values.byte[]
long
int
int
hashCode()
Returns a lazily computed hash code from attributes:decisionRequirementsId
,decisionRequirementsName
,decisionRequirementsVersion
,decisionRequirementsKey
,namespace
,resourceName
,checksum
,duplicate
.boolean
toString()
Prints the immutable valueDecisionRequirementsMetadataValue
with attribute values.withChecksum
(byte... elements) Copy the current immutable object with elements that replace the content ofchecksum
.withDecisionRequirementsId
(String value) Copy the current immutable object by setting a value for thedecisionRequirementsId
attribute.withDecisionRequirementsKey
(long value) Copy the current immutable object by setting a value for thedecisionRequirementsKey
attribute.Copy the current immutable object by setting a value for thedecisionRequirementsName
attribute.withDecisionRequirementsVersion
(int value) Copy the current immutable object by setting a value for thedecisionRequirementsVersion
attribute.withDuplicate
(boolean value) Copy the current immutable object by setting a value for theduplicate
attribute.withNamespace
(String value) Copy the current immutable object by setting a value for thenamespace
attribute.withResourceName
(String value) Copy the current immutable object by setting a value for theresourceName
attribute.
-
Method Details
-
getDecisionRequirementsId
- Specified by:
getDecisionRequirementsId
in interfaceDecisionRequirementsMetadataValue
- Returns:
- the ID of the DRG in the DMN
-
getDecisionRequirementsName
- Specified by:
getDecisionRequirementsName
in interfaceDecisionRequirementsMetadataValue
- Returns:
- the name of the DRG in the DMN
-
getDecisionRequirementsVersion
public int getDecisionRequirementsVersion()- Specified by:
getDecisionRequirementsVersion
in interfaceDecisionRequirementsMetadataValue
- Returns:
- the version of the deployed DRG
-
getDecisionRequirementsKey
public long getDecisionRequirementsKey()- Specified by:
getDecisionRequirementsKey
in interfaceDecisionRequirementsMetadataValue
- Returns:
- the key of the deployed DRG
-
getNamespace
- Specified by:
getNamespace
in interfaceDecisionRequirementsMetadataValue
- Returns:
- the namespace of the DRG in the DMN
-
getResourceName
- Specified by:
getResourceName
in interfaceDecisionRequirementsMetadataValue
- Returns:
- the name of the resource through which this DRG was deployed
-
getChecksum
public byte[] getChecksum()- Specified by:
getChecksum
in interfaceDecisionRequirementsMetadataValue
- Returns:
- the checksum of the DMN resource (MD5)
-
isDuplicate
public boolean isDuplicate()- Specified by:
isDuplicate
in interfaceDecisionRequirementsMetadataValue
- Returns:
true
if the DRG is a duplicate (and has been deployed previously), otherwisefalse
-
withDecisionRequirementsId
Copy the current immutable object by setting a value for thedecisionRequirementsId
attribute. 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
this
object
-
withDecisionRequirementsName
Copy the current immutable object by setting a value for thedecisionRequirementsName
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for decisionRequirementsName (can benull
)- Returns:
- A modified copy of the
this
object
-
withDecisionRequirementsVersion
Copy the current immutable object by setting a value for thedecisionRequirementsVersion
attribute. A value equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for decisionRequirementsVersion- Returns:
- A modified copy of the
this
object
-
withDecisionRequirementsKey
Copy the current immutable object by setting a value for thedecisionRequirementsKey
attribute. 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
this
object
-
withNamespace
Copy the current immutable object by setting a value for thenamespace
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for namespace (can benull
)- Returns:
- A modified copy of the
this
object
-
withResourceName
Copy the current immutable object by setting a value for theresourceName
attribute. An equals check used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for resourceName (can benull
)- Returns:
- A modified copy of the
this
object
-
withChecksum
Copy the current immutable object with elements that replace the content ofchecksum
. The array is cloned before being saved as attribute values.- Parameters:
elements
- The non-null elements for checksum- Returns:
- A modified copy of
this
object
-
withDuplicate
Copy the current immutable object by setting a value for theduplicate
attribute. 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
this
object
-
equals
This instance is equal to all instances ofImmutableDecisionRequirementsMetadataValue
that have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:decisionRequirementsId
,decisionRequirementsName
,decisionRequirementsVersion
,decisionRequirementsKey
,namespace
,resourceName
,checksum
,duplicate
. -
toString
Prints the immutable valueDecisionRequirementsMetadataValue
with attribute values. -
copyOf
public static ImmutableDecisionRequirementsMetadataValue copyOf(DecisionRequirementsMetadataValue instance) Creates an immutable copy of aDecisionRequirementsMetadataValue
value. 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 DecisionRequirementsMetadataValue instance
-
builder
Creates a builder forImmutableDecisionRequirementsMetadataValue
.ImmutableDecisionRequirementsMetadataValue.builder() .withDecisionRequirementsId(String | null) // nullable
decisionRequirementsId
.withDecisionRequirementsName(String | null) // nullabledecisionRequirementsName
.withDecisionRequirementsVersion(int) // optionaldecisionRequirementsVersion
.withDecisionRequirementsKey(long) // optionaldecisionRequirementsKey
.withNamespace(String | null) // nullablenamespace
.withResourceName(String | null) // nullableresourceName
.withChecksum(byte[] | null) // nullablechecksum
.withDuplicate(boolean) // optionalduplicate
.build();- Returns:
- A new ImmutableDecisionRequirementsMetadataValue builder
-