@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getArguments() != null) { // CompletedWorkout completedWorkout = getCompletedWorkout(); long sessionId = getArguments().getLong("sessionId", -1); session = Session.load(Session.class, sessionId); completedSession = new CompletedSession(); completedSession.session = session; Log.d(LOG_TAG, "order: " + completedSession.order); CompletedWorkout completedWorkout = CompletedWorkout.load( CompletedWorkout.class, getArguments().getLong("completedWorkoutId", -1)); completedSession.completedWorkout = completedWorkout; position = getArguments().getInt("position"); } }