Record Class RunTaskWithStateCommand
java.lang.Object
java.lang.Record
org.sterl.spring.persistent_tasks.trigger.model.RunTaskWithStateCommand
- All Implemented Interfaces:
HasTrigger
public record RunTaskWithStateCommand(PersistentTask<Serializable> task, Optional<org.springframework.transaction.support.TransactionTemplate> trx, Serializable state, RunningTriggerEntity trigger, RunningTrigger<Serializable> runningTrigger)
extends Record
implements HasTrigger
-
Constructor Summary
ConstructorsConstructorDescriptionRunTaskWithStateCommand(PersistentTask<Serializable> task, Optional<org.springframework.transaction.support.TransactionTemplate> trx, Serializable state, RunningTriggerEntity trigger) RunTaskWithStateCommand(PersistentTask<Serializable> task, Optional<org.springframework.transaction.support.TransactionTemplate> trx, Serializable state, RunningTriggerEntity trigger, RunningTrigger<Serializable> runningTrigger) Creates an instance of aRunTaskWithStateCommandrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.execute(EditTriggerComponent editTrigger) getData()getId()final inthashCode()Returns a hash code value for this object.Returns the value of therunningTriggerrecord component.state()Returns the value of thestaterecord component.task()Returns the value of thetaskrecord component.final StringtoString()Returns a string representation of this record class.trigger()Returns the value of thetriggerrecord component.Optional<org.springframework.transaction.support.TransactionTemplate> trx()Returns the value of thetrxrecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.sterl.spring.persistent_tasks.shared.model.HasTrigger
executionCount, isRunning, key, newTaskId, shouldRunInFuture, status
-
Constructor Details
-
RunTaskWithStateCommand
public RunTaskWithStateCommand(PersistentTask<Serializable> task, Optional<org.springframework.transaction.support.TransactionTemplate> trx, Serializable state, RunningTriggerEntity trigger) -
RunTaskWithStateCommand
public RunTaskWithStateCommand(PersistentTask<Serializable> task, Optional<org.springframework.transaction.support.TransactionTemplate> trx, Serializable state, RunningTriggerEntity trigger, RunningTrigger<Serializable> runningTrigger) Creates an instance of aRunTaskWithStateCommandrecord class.- Parameters:
task- the value for thetaskrecord componenttrx- the value for thetrxrecord componentstate- the value for thestaterecord componenttrigger- the value for thetriggerrecord componentrunningTrigger- the value for therunningTriggerrecord component
-
-
Method Details
-
execute
-
getData
- Specified by:
getDatain interfaceHasTrigger
-
getId
- Specified by:
getIdin interfaceHasTrigger
-
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 thetaskrecord component.- Returns:
- the value of the
taskrecord component
-
trx
Returns the value of thetrxrecord component.- Returns:
- the value of the
trxrecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
trigger
Returns the value of thetriggerrecord component.- Returns:
- the value of the
triggerrecord component
-
runningTrigger
Returns the value of therunningTriggerrecord component.- Returns:
- the value of the
runningTriggerrecord component
-