java.lang.Object
org.axonframework.modelling.saga.repository.jpa.SagaEntry<T>

@Entity @Entity public class SagaEntry<T> extends Object
Java Persistence Entity allowing sagas to be stored in a relational database.
Since:
0.7
Author:
Allard Buijze
  • Field Details

    • sagaId

      protected String sagaId
    • sagaType

      protected String sagaType
    • revision

      protected String revision
    • serializedSaga

      protected byte[] serializedSaga
  • Constructor Details

    • SagaEntry

      public SagaEntry(T saga, String sagaIdentifier, Serializer serializer)
      Constructs a new SagaEntry for the given saga. The given saga must be serializable. The provided saga is not modified by this operation.
      Parameters:
      saga - The saga to store
      sagaIdentifier - The saga identifier
      serializer - The serialization mechanism to convert the Saga to a byte stream
    • SagaEntry

      protected SagaEntry()
      Constructor required by JPA. Do not use.
      See Also:
  • Method Details

    • getSerializedSaga

      public byte[] getSerializedSaga()
      Returns the serialized form of the Saga.
      Returns:
      the serialized form of the Saga
    • getSagaId

      public String getSagaId()
      Returns the identifier of the saga contained in this entry
      Returns:
      the identifier of the saga contained in this entry
    • getRevision

      public String getRevision()
      Returns the revision of the serialized saga
      Returns:
      the revision of the serialized saga
    • getSagaType

      public String getSagaType()
      Returns the type identifier of the serialized saga
      Returns:
      the type identifier of the serialized saga