Add redis repository config support

- Change machine id as empty string instead of null
  if it's not set.
- Implement domain classes for redis.
- Shared tests.
- Fixes #267
This commit is contained in:
Janne Valkealahti
2016-11-05 10:04:20 +00:00
parent bd7e0141ea
commit fd6fcb6ee2
29 changed files with 2347 additions and 6 deletions

View File

@@ -72,6 +72,7 @@ public class JpaRepositoryState extends RepositoryState {
* Instantiates a new jpa repository state.
*/
public JpaRepositoryState() {
this(null);
}
/**
@@ -80,7 +81,7 @@ public class JpaRepositoryState extends RepositoryState {
* @param state the state
*/
public JpaRepositoryState(String state) {
this.state = state;
this(state, false);
}
/**
@@ -129,7 +130,7 @@ public class JpaRepositoryState extends RepositoryState {
*/
public JpaRepositoryState(String machineId, JpaRepositoryState parentState, String state, boolean initial, Set<JpaRepositoryAction> stateActions,
Set<JpaRepositoryAction> entryActions, Set<JpaRepositoryAction> exitActions) {
this.machineId = machineId;
this.machineId = machineId == null ? "" : machineId;
this.parentState = parentState;
this.state = state;
this.initial = initial;

View File

@@ -102,7 +102,7 @@ public class JpaRepositoryTransition extends RepositoryTransition {
* @param actions the actions
*/
public JpaRepositoryTransition(String machineId, JpaRepositoryState source, JpaRepositoryState target, String event, Set<JpaRepositoryAction> actions) {
this.machineId = machineId;
this.machineId = machineId == null ? "" : machineId;
this.source = source;
this.target = target;
this.event = event;