Class ImmutableFormMetadataValue
java.lang.Object
io.camunda.zeebe.protocol.record.value.deployment.ImmutableFormMetadataValue
- All Implemented Interfaces:
JsonSerializable,RecordValue,FormMetadataValue,TenantOwned
Immutable implementation of
FormMetadataValue.
Use the builder to create immutable instances:
ImmutableFormMetadataValue.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableFormMetadataValue. -
Field Summary
Fields inherited from interface io.camunda.zeebe.protocol.record.value.TenantOwned
DEFAULT_TENANT_IDENTIFIER -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableFormMetadataValue.static ImmutableFormMetadataValuecopyOf(FormMetadataValue instance) Creates an immutable copy of aFormMetadataValuevalue.booleanThis instance is equal to all instances ofImmutableFormMetadataValuethat have equal attribute values.byte[]longlongReturns the identifier of the tenant that owns this entity.intinthashCode()Returns a lazily computed hash code from attributes:tenantId,formId,version,versionTag,formKey,resourceName,checksum,duplicate,deploymentKey.booleantoString()Prints the immutable valueFormMetadataValuewith attribute values.withChecksum(byte... elements) Copy the current immutable object with elements that replace the content ofchecksum.withDeploymentKey(long value) Copy the current immutable object by setting a value for thedeploymentKeyattribute.withDuplicate(boolean value) Copy the current immutable object by setting a value for theduplicateattribute.withFormId(String value) Copy the current immutable object by setting a value for theformIdattribute.withFormKey(long value) Copy the current immutable object by setting a value for theformKeyattribute.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.withVersion(int value) Copy the current immutable object by setting a value for theversionattribute.withVersionTag(String value) Copy the current immutable object by setting a value for theversionTagattribute.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
-
getFormId
- Specified by:
getFormIdin interfaceFormMetadataValue- Returns:
- the ID of the form
-
getVersion
public int getVersion()- Specified by:
getVersionin interfaceFormMetadataValue- Returns:
- the version of the deployed form
-
getVersionTag
- Specified by:
getVersionTagin interfaceFormMetadataValue- Returns:
- the custom version tag of the form
-
getFormKey
public long getFormKey()- Specified by:
getFormKeyin interfaceFormMetadataValue- Returns:
- the key of the deployed form
-
getResourceName
- Specified by:
getResourceNamein interfaceFormMetadataValue- Returns:
- the name of the resource through which this form was deployed
-
getChecksum
public byte[] getChecksum()- Specified by:
getChecksumin interfaceFormMetadataValue- Returns:
- the checksum of the form resource (MD5)
-
isDuplicate
public boolean isDuplicate()- Specified by:
isDuplicatein interfaceFormMetadataValue- Returns:
trueif the form is a duplicate (and has been deployed previously), otherwisefalse
-
getDeploymentKey
public long getDeploymentKey()- Specified by:
getDeploymentKeyin interfaceFormMetadataValue- Returns:
- the key of the deployment this form was deployed with
-
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
-
withFormId
Copy the current immutable object by setting a value for theformIdattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for formId (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
-
withVersionTag
Copy the current immutable object by setting a value for theversionTagattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for versionTag (can benull)- Returns:
- A modified copy of the
thisobject
-
withFormKey
Copy the current immutable object by setting a value for theformKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for formKey- 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
-
withDeploymentKey
Copy the current immutable object by setting a value for thedeploymentKeyattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for deploymentKey- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableFormMetadataValuethat have equal attribute values. -
hashCode
public int hashCode()Returns a lazily computed hash code from attributes:tenantId,formId,version,versionTag,formKey,resourceName,checksum,duplicate,deploymentKey. -
toString
Prints the immutable valueFormMetadataValuewith attribute values. -
copyOf
Creates an immutable copy of aFormMetadataValuevalue. 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 FormMetadataValue instance
-
builder
Creates a builder forImmutableFormMetadataValue.ImmutableFormMetadataValue.builder() .withTenantId(String | null) // nullabletenantId.withFormId(String | null) // nullableformId.withVersion(int) // optionalversion.withVersionTag(String | null) // nullableversionTag.withFormKey(long) // optionalformKey.withResourceName(String | null) // nullableresourceName.withChecksum(byte[] | null) // nullablechecksum.withDuplicate(boolean) // optionalduplicate.withDeploymentKey(long) // optionaldeploymentKey.build();- Returns:
- A new ImmutableFormMetadataValue builder
-