Class JpaRepositoryStateMachinePersist<S,E>
java.lang.Object
org.springframework.statemachine.data.RepositoryStateMachinePersist<JpaRepositoryStateMachine,S,E>
org.springframework.statemachine.data.jpa.JpaRepositoryStateMachinePersist<S,E>
- Type Parameters:
S
- the type of stateE
- the type of event
- All Implemented Interfaces:
StateMachinePersist<S,
E, Object>
public class JpaRepositoryStateMachinePersist<S,E>
extends RepositoryStateMachinePersist<JpaRepositoryStateMachine,S,E>
JPA
based implementation of a RepositoryStateMachinePersist
.-
Constructor Summary
ConstructorDescriptionJpaRepositoryStateMachinePersist
(JpaStateMachineRepository jpaStateMachineRepository) Instantiates a new jpa repository state machine persist.JpaRepositoryStateMachinePersist
(JpaStateMachineRepository jpaStateMachineRepository, StateMachineSerialisationService<S, E> serialisationService) Instantiates a new jpa repository state machine persist. -
Method Summary
Modifier and TypeMethodDescriptionprotected JpaRepositoryStateMachine
build
(StateMachineContext<S, E> context, Object contextObj, byte[] serialisedContext) Builds the genericRepositoryStateMachine
entity.protected StateMachineRepository<JpaRepositoryStateMachine>
Gets the repository.Methods inherited from class org.springframework.statemachine.data.RepositoryStateMachinePersist
read, write
-
Constructor Details
-
JpaRepositoryStateMachinePersist
Instantiates a new jpa repository state machine persist.- Parameters:
jpaStateMachineRepository
- the jpa state machine repository
-
JpaRepositoryStateMachinePersist
public JpaRepositoryStateMachinePersist(JpaStateMachineRepository jpaStateMachineRepository, StateMachineSerialisationService<S, E> serialisationService) Instantiates a new jpa repository state machine persist.- Parameters:
jpaStateMachineRepository
- the jpa state machine repositoryserialisationService
- the serialisation service
-
-
Method Details
-
getRepository
Description copied from class:RepositoryStateMachinePersist
Gets the repository.- Specified by:
getRepository
in classRepositoryStateMachinePersist<JpaRepositoryStateMachine,
S, E> - Returns:
- the repository
-
build
protected JpaRepositoryStateMachine build(StateMachineContext<S, E> context, Object contextObj, byte[] serialisedContext) Description copied from class:RepositoryStateMachinePersist
Builds the genericRepositoryStateMachine
entity.- Specified by:
build
in classRepositoryStateMachinePersist<JpaRepositoryStateMachine,
S, E> - Parameters:
context
- the contextcontextObj
- the context objserialisedContext
- the serialised context- Returns:
- the repository state machine entity
-