class OfflineQueryLogic {

  static <T extends ParseObject> Task<Void> fetchIncludesAsync(
      final OfflineStore store,
      final T object,
      ParseQuery.State<T> state,
      final ParseSQLiteDatabase db) {
    Set<String> includes = state.includes();
    // We do the fetches in series because it makes it easier to fail on the first error.
    Task<Void> task = Task.forResult(null);
    for (final String include : includes) {
      task = task.onSuccessTask(new Continuation<Void, Task<Void>>() {
        @Override
        public Task<Void> then(Task<Void> task) throws Exception {
          return fetchIncludeAsync(store, object, include, db);
        }
      });
    }
    return task;
  }

    OfflineQueryLogic(OfflineStore store);

}