Class SagaEntry<T>
java.lang.Object
org.axonframework.modelling.saga.repository.jpa.SagaEntry<T>
Java Persistence Entity allowing sagas to be stored in a relational database.
- Since:
- 0.7
- Author:
- Allard Buijze
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor required by JPA.SagaEntry(T saga, String sagaIdentifier, Serializer serializer) Constructs a new SagaEntry for the givensaga. -
Method Summary
Modifier and TypeMethodDescriptionReturns the revision of the serialized sagaReturns the identifier of the saga contained in this entryReturns the type identifier of the serialized sagabyte[]Returns the serialized form of the Saga.
-
Field Details
-
sagaId
-
sagaType
-
revision
-
serializedSaga
protected byte[] serializedSaga
-
-
Constructor Details
-
SagaEntry
Constructs a new SagaEntry for the givensaga. The given saga must be serializable. The provided saga is not modified by this operation.- Parameters:
saga- The saga to storesagaIdentifier- The saga identifierserializer- 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
Returns the identifier of the saga contained in this entry- Returns:
- the identifier of the saga contained in this entry
-
getRevision
Returns the revision of the serialized saga- Returns:
- the revision of the serialized saga
-
getSagaType
Returns the type identifier of the serialized saga- Returns:
- the type identifier of the serialized saga
-