org.axonframework.saga.repository.jpa
Class SagaEntry

java.lang.Object
  extended by org.axonframework.saga.repository.jpa.SagaEntry

public class SagaEntry
extends Object

Java Persistence Entity allowing sagas to be stored in a relational database.

Since:
0.7
Author:
Allard Buijze

Constructor Summary
protected SagaEntry()
          Constructor required by JPA.
  SagaEntry(Saga saga, SagaSerializer serializer)
          Constructs a new SagaEntry for the given saga.
 
Method Summary
 Saga getSaga(SagaSerializer serializer)
          Returns the Saga instance stored in this entry.
 String getSagaId()
          Returns the Identifier of the Saga stored in this entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SagaEntry

public SagaEntry(Saga saga,
                 SagaSerializer 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
serializer - The serialization mechanism to convert the Saga to a byte stream

SagaEntry

protected SagaEntry()
Constructor required by JPA. Do not use.

See Also:
SagaEntry(org.axonframework.saga.Saga, org.axonframework.saga.repository.SagaSerializer)
Method Detail

getSaga

public Saga getSaga(SagaSerializer serializer)
Returns the Saga instance stored in this entry.

Parameters:
serializer - The serializer to decode the Saga
Returns:
the Saga instance stored in this entry

getSagaId

public String getSagaId()
Returns the Identifier of the Saga stored in this entry.

Returns:
the Identifier of the Saga stored in this entry


Copyright © 2011. All Rights Reserved.