Record Class StateInstanceEntity
java.lang.Object
java.lang.Record
com.yworkflow.instance.repository.StateInstanceEntity
- Record Components:
id- the unique identifier for this state instancestateId- the ID of the state this instance representscaller- the caller who initiated this state instancedueAt- when this state instance is duestartedAt- when this state instance was startedcompletedAt- when this state instance was completed (null if not completed)owners- the list of users responsible for this state instancepreviousStateInstanceIds- the list of previous state instance IDstransitionId- the transition that led to this state instanceresultStatus- 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 Summary
ConstructorsConstructorDescriptionStateInstanceEntity(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 aStateInstanceEntityrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncaller()Returns the value of thecallerrecord component.Returns the value of thecompletedAtrecord component.dueAt()Returns the value of thedueAtrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.owners()Returns the value of theownersrecord component.Returns the value of thepreviousStateInstanceIdsrecord component.Returns the value of theresultStatusrecord component.Returns the value of thestartedAtrecord component.stateId()Returns the value of thestateIdrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetransitionIdrecord component.
-
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 aStateInstanceEntityrecord class.- Parameters:
id- the value for theidrecord componentstateId- the value for thestateIdrecord componentcaller- the value for thecallerrecord componentdueAt- the value for thedueAtrecord componentstartedAt- the value for thestartedAtrecord componentcompletedAt- the value for thecompletedAtrecord componentowners- the value for theownersrecord componentpreviousStateInstanceIds- the value for thepreviousStateInstanceIdsrecord componenttransitionId- the value for thetransitionIdrecord componentresultStatus- the value for theresultStatusrecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
stateId
Returns the value of thestateIdrecord component.- Returns:
- the value of the
stateIdrecord component
-
caller
Returns the value of thecallerrecord component.- Returns:
- the value of the
callerrecord component
-
dueAt
Returns the value of thedueAtrecord component.- Returns:
- the value of the
dueAtrecord component
-
startedAt
Returns the value of thestartedAtrecord component.- Returns:
- the value of the
startedAtrecord component
-
completedAt
Returns the value of thecompletedAtrecord component.- Returns:
- the value of the
completedAtrecord component
-
owners
Returns the value of theownersrecord component.- Returns:
- the value of the
ownersrecord component
-
previousStateInstanceIds
Returns the value of thepreviousStateInstanceIdsrecord component.- Returns:
- the value of the
previousStateInstanceIdsrecord component
-
transitionId
Returns the value of thetransitionIdrecord component.- Returns:
- the value of the
transitionIdrecord component
-
resultStatus
Returns the value of theresultStatusrecord component.- Returns:
- the value of the
resultStatusrecord component
-