Class StateInstanceId
java.lang.Object
com.yworkflow.instance.model.value.StateInstanceId
- All Implemented Interfaces:
Comparable<StateInstanceId>
Immutable value object representing a unique identifier for a workflow state instance.
StateInstanceId provides type-safe identification of state instances within workflow executions,
ensuring proper tracking and management of individual state instances.
- Since:
- 1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StateInstanceIdEmpty state instance ID with no value. -
Method Summary
Modifier and TypeMethodDescriptionasLong()Converts this state instance ID to a Long value.intbooleangetValue()Gets the string value of this state instance ID.inthashCode()static StateInstanceIdstateInstanceId(String value) Creates a new StateInstanceId with the specified value.toString()
-
Field Details
-
EMPTY
Empty state instance ID with no value.
-
-
Method Details
-
getValue
Gets the string value of this state instance ID.- Returns:
- the ID value as a string
-
stateInstanceId
Creates a new StateInstanceId with the specified value.- Parameters:
value- the state instance ID value- Returns:
- a new StateInstanceId instance
- Throws:
IllegalArgumentException- if the value is null or empty
-
compareTo
- Specified by:
compareToin interfaceComparable<StateInstanceId>
-
equals
-
hashCode
public int hashCode() -
toString
-
asLong
Converts this state instance ID to a Long value.- Returns:
- the Long representation of this ID
- Throws:
NumberFormatException- if the ID value is not a valid Long
-