S
- the type of stateE
- the type of eventT
- the type of persister context objectpublic class JpaPersistingStateMachineInterceptor<S,E,T> extends AbstractPersistingStateMachineInterceptor<S,E,T> implements StateMachineRuntimePersister<S,E,T>
JPA
implementation of a AbstractPersistingStateMachineInterceptor
.Constructor and Description |
---|
JpaPersistingStateMachineInterceptor(JpaRepositoryStateMachinePersist<S,E> persist)
Instantiates a new jpa persisting state machine interceptor.
|
JpaPersistingStateMachineInterceptor(JpaStateMachineRepository jpaStateMachineRepository)
Instantiates a new jpa persisting state machine interceptor.
|
Modifier and Type | Method and Description |
---|---|
StateMachineInterceptor<S,E> |
getInterceptor()
Gets a
StateMachineInterceptor handling machine persistence. |
StateMachineContext<S,E> |
read(java.lang.Object contextObj)
Read
StateMachineContext from persistent store. |
void |
write(StateMachineContext<S,E> context,
T contextObj)
Write
StateMachineContext into persistent store. |
buildStateMachineContext, postStateChange, preStateChange, setExtendedStateVariablesFunction
postTransition, preEvent, preTransition, stateMachineError
public JpaPersistingStateMachineInterceptor(JpaStateMachineRepository jpaStateMachineRepository)
jpaStateMachineRepository
- the jpa state machine repositorypublic JpaPersistingStateMachineInterceptor(JpaRepositoryStateMachinePersist<S,E> persist)
persist
- the persistpublic StateMachineInterceptor<S,E> getInterceptor()
StateMachineRuntimePersister
StateMachineInterceptor
handling machine persistence.getInterceptor
in interface StateMachineRuntimePersister<S,E,T>
public void write(StateMachineContext<S,E> context, T contextObj) throws java.lang.Exception
AbstractPersistingStateMachineInterceptor
StateMachineContext
into persistent store.write
in interface StateMachinePersist<S,E,T>
write
in class AbstractPersistingStateMachineInterceptor<S,E,T>
context
- the state machine contextcontextObj
- the context objectjava.lang.Exception
- the exceptionpublic StateMachineContext<S,E> read(java.lang.Object contextObj) throws java.lang.Exception
AbstractPersistingStateMachineInterceptor
StateMachineContext
from persistent store.read
in interface StateMachinePersist<S,E,T>
read
in class AbstractPersistingStateMachineInterceptor<S,E,T>
contextObj
- the context objectjava.lang.Exception
- the exception