// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/actions/TodoAction.java
// public class TodoAction extends FluxAction<Integer, List<Todo>> {
// 
//     public TodoAction(final Integer inType, final List<Todo> inData) {
//         super(inType, inData);
//     }
// 
// }
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/actions/UserAction.java
// public class UserAction extends FluxAction<Integer, List<User>> {
// 
//     public UserAction(final Integer inType, final List<User> inData) {
//         super(inType, inData);
//     }
// 
// }
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/models/Todo.java
// public class Todo {
// 
//     public int id;
//     public String title;
//     public String dueDate;
//     public String memo;
//     public boolean closed;
// 
//     public Todo() {}
// 
//     public Todo(final int inId) {
//         id = inId;
//     }
// 
//     public Todo(final Todo inClone) {
//         this.id = inClone.id;
//         this.title = inClone.title;
//         this.dueDate = inClone.dueDate;
//         this.memo = inClone.memo;
//         this.closed = inClone.closed;
//     }
// 
// }
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/models/User.java
// public class User {
// 
//     public String name;
// 
//     public User() {}
// 
//     public User(final String inName) {
//         name = inName;
//     }
// 
//     public User(final User inClone) {
//         this.name = inClone.name;
//     }
// 
// }
// 
// Path: fluxjava/src/main/java/io/wzcodes/fluxjava/IActionHelper.java
// public interface IActionHelper {
// 
//     /**
//      * Get a type of Action from type identity.
//      *
//      * @param inActionTypeId The type identity of Action.
//      * @since 2016/7/5
//      */
//     Class<?> getActionClass(final Object inActionTypeId);
// 
//     /**
//      * Wrap the data format from display to storage.
//      *
//      * @param inData The data need to be wrapped.
//      * @since 2016/7/5
//      */
//     Object wrapData(final Object inData);
// 
// }
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/Constants.java
// public static final int TODO_ADD = DATA_TODO + 2;
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/Constants.java
// public static final int TODO_CLOSE = DATA_TODO + 3;
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/Constants.java
// public static final int TODO_LOAD = DATA_TODO + 1;
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/Constants.java
// public static final int USER_LOAD = DATA_USER + 1;


import com.example.fluxjava.eventbus.domain.actions.TodoAction;
import com.example.fluxjava.eventbus.domain.actions.UserAction;
import com.example.fluxjava.eventbus.domain.models.Todo;
import com.example.fluxjava.eventbus.domain.models.User;
import io.wzcodes.fluxjava.IActionHelper;
import java.util.ArrayList;
import static com.example.fluxjava.eventbus.domain.Constants.TODO_ADD;
import static com.example.fluxjava.eventbus.domain.Constants.TODO_CLOSE;
import static com.example.fluxjava.eventbus.domain.Constants.TODO_LOAD;
import static com.example.fluxjava.eventbus.domain.Constants.USER_LOAD;
        final String[] memos = {
                "Prepare presentation and demo the system.",
                "Jane's birthday.",
                "",
                "",
                "Traveling to LA on weekend.",
                "Living room and kitchen",
                "I bought some new albums last week.",
                "Followup for the new client thread."
        };
        final String[] dueDates = {
                "2016/1/25",
                "2016/2/14",
                "2016/2/2",
                "Never",
                "2016/1/31",
                "2016/1/28",
                "2016/7/12",
                "2016/6/30"
        };
        final int startIndex = (inUserIndex % 3);

        // Simulate the data retrieve from remote
        for (int i = startIndex; i < titles.length; i++) {
            final Todo todo = new Todo();

            todo.id = i;
            todo.title = titles[i];
            todo.memo = memos[i];
            todo.dueDate = dueDates[i];
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/actions/TodoAction.java
// public class TodoAction extends FluxAction<Integer, List<Todo>> {
// 
//     public TodoAction(final Integer inType, final List<Todo> inData) {
//         super(inType, inData);
//     }
// 
// }
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/actions/UserAction.java
// public class UserAction extends FluxAction<Integer, List<User>> {
// 
//     public UserAction(final Integer inType, final List<User> inData) {
//         super(inType, inData);
//     }
// 
// }
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/models/Todo.java
// public class Todo {
// 
//     public int id;
//     public String title;
//     public String dueDate;
//     public String memo;
//     public boolean closed;
// 
//     public Todo() {}
// 
//     public Todo(final int inId) {
//         id = inId;
//     }
// 
//     public Todo(final Todo inClone) {
//         this.id = inClone.id;
//         this.title = inClone.title;
//         this.dueDate = inClone.dueDate;
//         this.memo = inClone.memo;
//         this.closed = inClone.closed;
//     }
// 
// }
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/models/User.java
// public class User {
// 
//     public String name;
// 
//     public User() {}
// 
//     public User(final String inName) {
//         name = inName;
//     }
// 
//     public User(final User inClone) {
//         this.name = inClone.name;
//     }
// 
// }
// 
// Path: fluxjava/src/main/java/io/wzcodes/fluxjava/IActionHelper.java
// public interface IActionHelper {
// 
//     /**
//      * Get a type of Action from type identity.
//      *
//      * @param inActionTypeId The type identity of Action.
//      * @since 2016/7/5
//      */
//     Class<?> getActionClass(final Object inActionTypeId);
// 
//     /**
//      * Wrap the data format from display to storage.
//      *
//      * @param inData The data need to be wrapped.
//      * @since 2016/7/5
//      */
//     Object wrapData(final Object inData);
// 
// }
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/Constants.java
// public static final int TODO_ADD = DATA_TODO + 2;
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/Constants.java
// public static final int TODO_CLOSE = DATA_TODO + 3;
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/Constants.java
// public static final int TODO_LOAD = DATA_TODO + 1;
// 
// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/Constants.java
// public static final int USER_LOAD = DATA_USER + 1;


// Path: demo-eventbus/src/main/java/com/example/fluxjava/eventbus/domain/ActionHelper.java
import com.example.fluxjava.eventbus.domain.actions.TodoAction;
import com.example.fluxjava.eventbus.domain.actions.UserAction;
import com.example.fluxjava.eventbus.domain.models.Todo;
import com.example.fluxjava.eventbus.domain.models.User;
import io.wzcodes.fluxjava.IActionHelper;
import java.util.ArrayList;
import static com.example.fluxjava.eventbus.domain.Constants.TODO_ADD;
import static com.example.fluxjava.eventbus.domain.Constants.TODO_CLOSE;
import static com.example.fluxjava.eventbus.domain.Constants.TODO_LOAD;
import static com.example.fluxjava.eventbus.domain.Constants.USER_LOAD;

        final String[] memos = {
                "Prepare presentation and demo the system.",
                "Jane's birthday.",
                "",
                "",
                "Traveling to LA on weekend.",
                "Living room and kitchen",
                "I bought some new albums last week.",
                "Followup for the new client thread."
        };
        final String[] dueDates = {
                "2016/1/25",
                "2016/2/14",
                "2016/2/2",
                "Never",
                "2016/1/31",
                "2016/1/28",
                "2016/7/12",
                "2016/6/30"
        };
        final int startIndex = (inUserIndex % 3);

        // Simulate the data retrieve from remote
        for (int i = startIndex; i < titles.length; i++) {
            final Todo todo = new Todo();

            todo.id = i;
            todo.title = titles[i];
            todo.memo = memos[i];
            todo.dueDate = dueDates[i];
            todo.closed = false;