Class JpaTask

java.lang.Object
io.a2a.extras.taskstore.database.jpa.JpaTask

@Entity public class JpaTask extends Object
  • Constructor Details

    • JpaTask

      public JpaTask()
    • JpaTask

      public JpaTask(String id, String taskJson)
  • Method Details

    • getId

      public String getId()
    • setId

      public void setId(String id)
    • getTaskJson

      public String getTaskJson()
    • setTaskJson

      public void setTaskJson(String taskJson)
    • getFinalizedAt

      public Instant getFinalizedAt()
    • setFinalizedAt

      public void setFinalizedAt(Instant finalizedAt, boolean isFinalState)
      Sets the finalized timestamp for this task.

      This method is idempotent - it only sets the timestamp on the first transition to a final state, as a defense-in-depth measure complementing the existing application logic that prevents modifications to final tasks.

      Parameters:
      finalizedAt - the timestamp when the task was finalized
      isFinalState - whether the current task state is final
    • getTask

      public io.a2a.spec.Task getTask() throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • setTask

      public void setTask(io.a2a.spec.Task task) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException