Record Class RunTaskWithStateCommand
java.lang.Object
java.lang.Record
org.sterl.spring.persistent_tasks.trigger.model.RunTaskWithStateCommand
- All Implemented Interfaces:
HasTriggerData
public record RunTaskWithStateCommand(PersistentTask<Serializable> task, Optional<org.springframework.transaction.support.TransactionTemplate> trx, Serializable state, TriggerEntity trigger, RunningTrigger<Serializable> runningTrigger)
extends Record
implements HasTriggerData
-
Constructor Summary
ConstructorsConstructorDescriptionRunTaskWithStateCommand
(PersistentTask<Serializable> task, Optional<org.springframework.transaction.support.TransactionTemplate> trx, Serializable state, TriggerEntity trigger) RunTaskWithStateCommand
(PersistentTask<Serializable> task, Optional<org.springframework.transaction.support.TransactionTemplate> trx, Serializable state, TriggerEntity trigger, RunningTrigger<Serializable> runningTrigger) Creates an instance of aRunTaskWithStateCommand
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.execute
(EditTriggerComponent editTrigger) getData()
final int
hashCode()
Returns a hash code value for this object.Returns the value of therunningTrigger
record component.state()
Returns the value of thestate
record component.task()
Returns the value of thetask
record component.final String
toString()
Returns a string representation of this record class.trigger()
Returns the value of thetrigger
record component.Optional
<org.springframework.transaction.support.TransactionTemplate> trx()
Returns the value of thetrx
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.sterl.spring.persistent_tasks.shared.model.HasTriggerData
executionCount, isRunning, key, newTaskId, shouldRunInFuture, status
-
Constructor Details
-
RunTaskWithStateCommand
public RunTaskWithStateCommand(PersistentTask<Serializable> task, Optional<org.springframework.transaction.support.TransactionTemplate> trx, Serializable state, TriggerEntity trigger) -
RunTaskWithStateCommand
public RunTaskWithStateCommand(PersistentTask<Serializable> task, Optional<org.springframework.transaction.support.TransactionTemplate> trx, Serializable state, TriggerEntity trigger, RunningTrigger<Serializable> runningTrigger) Creates an instance of aRunTaskWithStateCommand
record class.- Parameters:
task
- the value for thetask
record componenttrx
- the value for thetrx
record componentstate
- the value for thestate
record componenttrigger
- the value for thetrigger
record componentrunningTrigger
- the value for therunningTrigger
record component
-
-
Method Details
-
execute
-
getData
- Specified by:
getData
in interfaceHasTriggerData
-
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)
. -
task
Returns the value of thetask
record component.- Returns:
- the value of the
task
record component
-
trx
Returns the value of thetrx
record component.- Returns:
- the value of the
trx
record component
-
state
Returns the value of thestate
record component.- Returns:
- the value of the
state
record component
-
trigger
Returns the value of thetrigger
record component.- Returns:
- the value of the
trigger
record component
-
runningTrigger
Returns the value of therunningTrigger
record component.- Returns:
- the value of the
runningTrigger
record component
-