Record Class StateInstanceEntity

java.lang.Object
java.lang.Record
com.yworkflow.instance.repository.StateInstanceEntity
Record Components:
id - the unique identifier for this state instance
stateId - the ID of the state this instance represents
caller - the caller who initiated this state instance
dueAt - when this state instance is due
startedAt - when this state instance was started
completedAt - when this state instance was completed (null if not completed)
owners - the list of users responsible for this state instance
previousStateInstanceIds - the list of previous state instance IDs
transitionId - the transition that led to this state instance
resultStatus - the current result status of this state instance

public record StateInstanceEntity(String id, String stateId, String caller, Instant dueAt, Instant startedAt, Instant completedAt, List<String> owners, List<String> previousStateInstanceIds, String transitionId, String resultStatus) extends Record
Represents a state instance entity in the repository layer. StateInstanceEntity encapsulates all the data needed to persist and retrieve a state instance, including its timing information, ownership, and execution history.
Since:
1.0
See Also:
  • Constructor Details

    • StateInstanceEntity

      public StateInstanceEntity(String id, String stateId, String caller, Instant dueAt, Instant startedAt, Instant completedAt, List<String> owners, List<String> previousStateInstanceIds, String transitionId, String resultStatus)
      Creates an instance of a StateInstanceEntity record class.
      Parameters:
      id - the value for the id record component
      stateId - the value for the stateId record component
      caller - the value for the caller record component
      dueAt - the value for the dueAt record component
      startedAt - the value for the startedAt record component
      completedAt - the value for the completedAt record component
      owners - the value for the owners record component
      previousStateInstanceIds - the value for the previousStateInstanceIds record component
      transitionId - the value for the transitionId record component
      resultStatus - the value for the resultStatus record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • stateId

      public String stateId()
      Returns the value of the stateId record component.
      Returns:
      the value of the stateId record component
    • caller

      public String caller()
      Returns the value of the caller record component.
      Returns:
      the value of the caller record component
    • dueAt

      public Instant dueAt()
      Returns the value of the dueAt record component.
      Returns:
      the value of the dueAt record component
    • startedAt

      public Instant startedAt()
      Returns the value of the startedAt record component.
      Returns:
      the value of the startedAt record component
    • completedAt

      public Instant completedAt()
      Returns the value of the completedAt record component.
      Returns:
      the value of the completedAt record component
    • owners

      public List<String> owners()
      Returns the value of the owners record component.
      Returns:
      the value of the owners record component
    • previousStateInstanceIds

      public List<String> previousStateInstanceIds()
      Returns the value of the previousStateInstanceIds record component.
      Returns:
      the value of the previousStateInstanceIds record component
    • transitionId

      public String transitionId()
      Returns the value of the transitionId record component.
      Returns:
      the value of the transitionId record component
    • resultStatus

      public String resultStatus()
      Returns the value of the resultStatus record component.
      Returns:
      the value of the resultStatus record component