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().

  • Method Details

    • getDecisionRequirementsId

      public String getDecisionRequirementsId()
      Specified by:
      getDecisionRequirementsId in interface DecisionRequirementsMetadataValue
      Returns:
      the ID of the DRG in the DMN
    • getDecisionRequirementsName

      public String getDecisionRequirementsName()
      Specified by:
      getDecisionRequirementsName in interface DecisionRequirementsMetadataValue
      Returns:
      the name of the DRG in the DMN
    • getDecisionRequirementsVersion

      public int getDecisionRequirementsVersion()
      Specified by:
      getDecisionRequirementsVersion in interface DecisionRequirementsMetadataValue
      Returns:
      the version of the deployed DRG
    • getDecisionRequirementsKey

      public long getDecisionRequirementsKey()
      Specified by:
      getDecisionRequirementsKey in interface DecisionRequirementsMetadataValue
      Returns:
      the key of the deployed DRG
    • getNamespace

      public String getNamespace()
      Specified by:
      getNamespace in interface DecisionRequirementsMetadataValue
      Returns:
      the namespace of the DRG in the DMN
    • getResourceName

      public String getResourceName()
      Specified by:
      getResourceName in interface DecisionRequirementsMetadataValue
      Returns:
      the name of the resource through which this DRG was deployed
    • getChecksum

      public byte[] getChecksum()
      Specified by:
      getChecksum in interface DecisionRequirementsMetadataValue
      Returns:
      the checksum of the DMN resource (MD5)
    • isDuplicate

      public boolean isDuplicate()
      Specified by:
      isDuplicate in interface DecisionRequirementsMetadataValue
      Returns:
      true if the DRG is a duplicate (and has been deployed previously), otherwise false
    • withDecisionRequirementsId

      public final ImmutableDecisionRequirementsMetadataValue withDecisionRequirementsId(String value)
      Copy the current immutable object by setting a value for the decisionRequirementsId attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for decisionRequirementsId (can be null)
      Returns:
      A modified copy of the this object
    • withDecisionRequirementsName

      public final ImmutableDecisionRequirementsMetadataValue withDecisionRequirementsName(String value)
      Copy the current immutable object by setting a value for the decisionRequirementsName attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for decisionRequirementsName (can be null)
      Returns:
      A modified copy of the this object
    • withDecisionRequirementsVersion

      public final ImmutableDecisionRequirementsMetadataValue withDecisionRequirementsVersion(int value)
      Copy the current immutable object by setting a value for the decisionRequirementsVersion attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for decisionRequirementsVersion
      Returns:
      A modified copy of the this object
    • withDecisionRequirementsKey

      public final ImmutableDecisionRequirementsMetadataValue withDecisionRequirementsKey(long value)
      Copy the current immutable object by setting a value for the decisionRequirementsKey attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for decisionRequirementsKey
      Returns:
      A modified copy of the this object
    • withNamespace

      public final ImmutableDecisionRequirementsMetadataValue withNamespace(String value)
      Copy the current immutable object by setting a value for the namespace attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for namespace (can be null)
      Returns:
      A modified copy of the this object
    • withResourceName

      public final ImmutableDecisionRequirementsMetadataValue withResourceName(String value)
      Copy the current immutable object by setting a value for the resourceName attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for resourceName (can be null)
      Returns:
      A modified copy of the this object
    • withChecksum

      public final ImmutableDecisionRequirementsMetadataValue withChecksum(byte... elements)
      Copy the current immutable object with elements that replace the content of checksum. 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

      public final ImmutableDecisionRequirementsMetadataValue withDuplicate(boolean value)
      Copy the current immutable object by setting a value for the duplicate attribute. A value equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for duplicate
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableDecisionRequirementsMetadataValue that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Returns a lazily computed hash code from attributes: decisionRequirementsId, decisionRequirementsName, decisionRequirementsVersion, decisionRequirementsKey, namespace, resourceName, checksum, duplicate.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value DecisionRequirementsMetadataValue with attribute values.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      Creates an immutable copy of a DecisionRequirementsMetadataValue 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 for ImmutableDecisionRequirementsMetadataValue.
       ImmutableDecisionRequirementsMetadataValue.builder()
          .withDecisionRequirementsId(String | null) // nullable decisionRequirementsId
          .withDecisionRequirementsName(String | null) // nullable decisionRequirementsName
          .withDecisionRequirementsVersion(int) // optional decisionRequirementsVersion
          .withDecisionRequirementsKey(long) // optional decisionRequirementsKey
          .withNamespace(String | null) // nullable namespace
          .withResourceName(String | null) // nullable resourceName
          .withChecksum(byte[] | null) // nullable checksum
          .withDuplicate(boolean) // optional duplicate
          .build();
       
      Returns:
      A new ImmutableDecisionRequirementsMetadataValue builder