Class WorkflowDefinitionId
java.lang.Object
com.yworkflow.definition.model.value.WorkflowDefinitionId
- All Implemented Interfaces:
ModelId,Comparable<WorkflowDefinitionId>
public class WorkflowDefinitionId
extends Object
implements ModelId, Comparable<WorkflowDefinitionId>
Represents a unique identifier for a workflow definition. WorkflowDefinitionId is an immutable
value object that serves as the primary key for workflow definitions within the yWorkflow engine.
WorkflowDefinitionId instances are created using the workflowDefinitionId(String)
factory method, which validates the input string to ensure it meets the requirements for workflow
IDs.
- Since:
- 1.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(WorkflowDefinitionId workflowDefinitionId) Compares this WorkflowDefinitionId with another WorkflowDefinitionId for ordering.booleanCompares this WorkflowDefinitionId with the specified object for equality.getValue()Returns the string value of this workflow definition ID.inthashCode()Returns the hash code for this WorkflowDefinitionId.toString()Returns a string representation of this WorkflowDefinitionId.static WorkflowDefinitionIdworkflowDefinitionId(String value) Creates a new WorkflowDefinitionId instance with the specified value.
-
Method Details
-
getValue
Returns the string value of this workflow definition ID. -
workflowDefinitionId
Creates a new WorkflowDefinitionId instance with the specified value. The value is validated to ensure it meets the requirements for workflow definition IDs.- Parameters:
value- the string value for the workflow definition ID- Returns:
- a new WorkflowDefinitionId instance
- Throws:
IllegalArgumentException- if the value is invalid
-
compareTo
Compares this WorkflowDefinitionId with another WorkflowDefinitionId for ordering. Comparison is based on the string value of the workflow definition ID.- Specified by:
compareToin interfaceComparable<WorkflowDefinitionId>- Parameters:
workflowDefinitionId- the WorkflowDefinitionId to compare with- Returns:
- a negative integer, zero, or a positive integer as this WorkflowDefinitionId is less than, equal to, or greater than the specified WorkflowDefinitionId
-
equals
Compares this WorkflowDefinitionId with the specified object for equality. Two WorkflowDefinitionId instances are equal if they have the same value. -
hashCode
public int hashCode()Returns the hash code for this WorkflowDefinitionId. -
toString
Returns a string representation of this WorkflowDefinitionId.
-