protected Task<List<ParseModelAbstract>> getQueryPhotosTask() {
   if (self.newModel == true) {
     List<ParseModelAbstract> empty = new LinkedList<>();
     return Task.forResult(empty);
   }
   return Photo.queryPhotosByModel(self.getPageModel());
 }
 private void setItemsInSection(Object[] rows) {
   self.rowModels = rows;
   for (int i = 0; i < rows.length; i++) {
     Object[] items = (Object[]) rows[i];
     if (items == null) {
       continue;
     }
     setSectionItems(CollectionUtils.createList(items), i);
   }
 }
  @Override
  protected void onCreate(Bundle savedInstanceState) {

    self.setEditModel(
        self.getTransferedModel(), self.getIntent().getExtras().getBoolean(IntentCache.newModel));

    // **** Important ****
    self.editManager = self.getEditManager();
    self.rowModels = self.editManager.getRowsInSection(self.editedModel, self);

    super.onCreate(savedInstanceState);

    //        assert(self.editedModel != nil, "Must setup editedModel's instance.")

    self.setRightBarButtonItem(
        self.rightButtonTitle(),
        new View.OnClickListener() {
          @Override
          public void onClick(View v) {
            self.saveModelAction();
          }
        });

    EditChangedObserver.sharedInstance.resetObserver();

    self.getQueryPhotosTask()
        .onSuccess(
            new Continuation<List<ParseModelAbstract>, Object>() {
              @Override
              public Object then(Task<List<ParseModelAbstract>> task) throws Exception {
                self.prepareForEditTableView();

                self.setItemsInSection(self.rowModels);
                self.configurePhotoGallerySection(task);

                return null;
              }
            },
            Task.UI_THREAD_EXECUTOR);
  }
  public IEAEditBaseViewController setEditModel(ParseModelAbstract editedModel, boolean newModel) {
    self.editedModel = editedModel;
    self.newModel = newModel;

    return self;
  }