Class ImmutableDecisionRequirementsRecordValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.deployment.ImmutableDecisionRequirementsRecordValue
- All Implemented Interfaces:
JsonSerializable,RecordValue,DecisionRequirementsMetadataValue,DecisionRequirementsRecordValue,TenantOwned
public final class ImmutableDecisionRequirementsRecordValue
extends Object
implements DecisionRequirementsRecordValue
Immutable implementation of
DecisionRequirementsRecordValue.
Use the builder to create immutable instances:
ImmutableDecisionRequirementsRecordValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableDecisionRequirementsRecordValue. -
Field Summary
Fields inherited from interface io.camunda.zeebe.protocol.record.value.TenantOwned
DEFAULT_TENANT_IDENTIFIER -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableDecisionRequirementsRecordValue.copyOf(DecisionRequirementsRecordValue instance) Creates an immutable copy of aDecisionRequirementsRecordValuevalue.booleanThis instance is equal to all instances ofImmutableDecisionRequirementsRecordValuethat have equal attribute values.byte[]longintbyte[]Returns the identifier of the tenant that owns this entity.inthashCode()Returns a lazily computed hash code from attributes:tenantId,decisionRequirementsId,decisionRequirementsName,decisionRequirementsVersion,decisionRequirementsKey,namespace,resourceName,checksum,duplicate,resource.booleantoString()Prints the immutable valueDecisionRequirementsRecordValuewith 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 thedecisionRequirementsIdattribute.withDecisionRequirementsKey(long value) Copy the current immutable object by setting a value for thedecisionRequirementsKeyattribute.Copy the current immutable object by setting a value for thedecisionRequirementsNameattribute.withDecisionRequirementsVersion(int value) Copy the current immutable object by setting a value for thedecisionRequirementsVersionattribute.withDuplicate(boolean value) Copy the current immutable object by setting a value for theduplicateattribute.withNamespace(String value) Copy the current immutable object by setting a value for thenamespaceattribute.withResource(byte... elements) Copy the current immutable object with elements that replace the content ofresource.withResourceName(String value) Copy the current immutable object by setting a value for theresourceNameattribute.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
-
getDecisionRequirementsId
- Specified by:
getDecisionRequirementsIdin interfaceDecisionRequirementsMetadataValue- Returns:
- the ID of the DRG in the DMN
-
getDecisionRequirementsName
- Specified by:
getDecisionRequirementsNamein interfaceDecisionRequirementsMetadataValue- Returns:
- the name of the DRG in the DMN
-
getDecisionRequirementsVersion
public int getDecisionRequirementsVersion()- Specified by:
getDecisionRequirementsVersionin interfaceDecisionRequirementsMetadataValue- Returns:
- the version of the deployed DRG
-
getDecisionRequirementsKey
public long getDecisionRequirementsKey()- Specified by:
getDecisionRequirementsKeyin interfaceDecisionRequirementsMetadataValue- Returns:
- the key of the deployed DRG
-
getNamespace
- Specified by:
getNamespacein interfaceDecisionRequirementsMetadataValue- Returns:
- the namespace of the DRG in the DMN
-
getResourceName
- Specified by:
getResourceNamein interfaceDecisionRequirementsMetadataValue- Returns:
- the name of the resource through which this DRG was deployed
-
getChecksum
public byte[] getChecksum()- Specified by:
getChecksumin interfaceDecisionRequirementsMetadataValue- Returns:
- the checksum of the DMN resource (MD5)
-
isDuplicate
public boolean isDuplicate()- Specified by:
isDuplicatein interfaceDecisionRequirementsMetadataValue- Returns:
trueif the DRG is a duplicate (and has been deployed previously), otherwisefalse
-
getResource
public byte[] getResource()- Specified by:
getResourcein interfaceDecisionRequirementsRecordValue- Returns:
- the binary DMN resource
-
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
-
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
-
withDecisionRequirementsName
Copy the current immutable object by setting a value for thedecisionRequirementsNameattribute. 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
thisobject
-
withDecisionRequirementsVersion
Copy the current immutable object by setting a value for thedecisionRequirementsVersionattribute. 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
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
-
withNamespace
Copy the current immutable object by setting a value for thenamespaceattribute. 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
thisobject
-
withResourceName
Copy the current immutable object by setting a value for theresourceNameattribute. 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
thisobject
-
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
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
-
withResource
Copy the current immutable object with elements that replace the content ofresource. The array is cloned before being saved as attribute values.- Parameters:
elements- The non-null elements for resource- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableDecisionRequirementsRecordValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:tenantId,decisionRequirementsId,decisionRequirementsName,decisionRequirementsVersion,decisionRequirementsKey,namespace,resourceName,checksum,duplicate,resource. -
toString
Prints the immutable valueDecisionRequirementsRecordValuewith attribute values. -
copyOf
public static ImmutableDecisionRequirementsRecordValue copyOf(DecisionRequirementsRecordValue instance) Creates an immutable copy of aDecisionRequirementsRecordValuevalue. 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 DecisionRequirementsRecordValue instance
-
builder
Creates a builder forImmutableDecisionRequirementsRecordValue.ImmutableDecisionRequirementsRecordValue.builder() .withTenantId(String | null) // nullabletenantId.withDecisionRequirementsId(String | null) // nullabledecisionRequirementsId.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.withResource(byte[] | null) // nullableresource.build();- Returns:
- A new ImmutableDecisionRequirementsRecordValue builder
-