Package org.sterl.pmw.command
Record Class TriggerWorkflowCommand<T extends Serializable>
java.lang.Object
java.lang.Record
org.sterl.pmw.command.TriggerWorkflowCommand<T>
public record TriggerWorkflowCommand<T extends Serializable>(Workflow<T extends Serializable> workflow, T extends Serializable state, Duration delay)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionTriggerWorkflowCommand(Workflow<T> workflow, T state, Duration delay) Creates an instance of aTriggerWorkflowCommandrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondelay()Returns the value of thedelayrecord component.final booleanIndicates whether some other object is "equal to" this one.voidfire(org.springframework.context.ApplicationEventPublisher eventPublisher) final inthashCode()Returns a hash code value for this object.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.workflow()Returns the value of theworkflowrecord component.
-
Constructor Details
-
TriggerWorkflowCommand
Creates an instance of aTriggerWorkflowCommandrecord class.- Parameters:
workflow- the value for theworkflowrecord componentstate- the value for thestaterecord componentdelay- the value for thedelayrecord component
-
-
Method Details
-
fire
public void fire(org.springframework.context.ApplicationEventPublisher eventPublisher) -
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). -
workflow
Returns the value of theworkflowrecord component.- Returns:
- the value of the
workflowrecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
delay
Returns the value of thedelayrecord component.- Returns:
- the value of the
delayrecord component
-