Class SagaEntry<T>
java.lang.Object
org.axonframework.modelling.saga.repository.jpa.SagaEntry<T>
- Type Parameters:
T- the type of saga stored in this entry
Java Persistence Entity allowing sagas to be stored in a relational database.
- Since:
- 0.7
- Author:
- Allard Buijze
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringValue written to therevisioncolumn of a saga inserted by this module, marking the row as one created here rather than by Axon Framework 4:protected StringSet toLEGACY_REVISIONfor an entry constructed here, and otherwise whatever wrote the row put there.protected Stringprotected Stringprotected byte[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the revision of the serialized saga, which isLEGACY_REVISIONfor an entry constructed here.Returns 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
-
LEGACY_REVISION
Value written to therevisioncolumn of a saga inserted by this module, marking the row as one created here rather than by Axon Framework 4:
Written on insert only. An update leaves the column alone, so a value written by Axon Framework 4 survives.SELECT sagaId FROM SagaEntry WHERE revision = 'axon-legacy'- See Also:
-
sagaId
-
sagaType
-
revision
Set toLEGACY_REVISIONfor an entry constructed here, and otherwise whatever wrote the row put there. Never read back when loading a saga. -
serializedSaga
protected byte[] serializedSaga
-
-
Constructor Details
-
SagaEntry
Constructs a new SagaEntry for the givensaga. The given saga must be convertible to a byte array. The provided saga is not modified by this operation.- Parameters:
saga- The saga to storesagaIdentifier- The saga identifierconverter- The conversion 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, which isLEGACY_REVISIONfor an entry constructed here.- Returns:
- the revision of the serialized saga
-
getSagaType
Returns the type identifier of the serialized saga- Returns:
- the type identifier of the serialized saga
-