Pass Data and Set All Data
ReActiveAndroid Version: Latest Bug or Feature Request: Feature
Description: Be able to pass set data to Method to update all values passed, which would save many manually written hard-coded methods within app;
Would tie in nicely with Transaction API as you could pass all this and use transaction via one API call
Example:
fetch data from server and set data like below;
//set temp model data in activity/fragment/service/response
Note myModelUsedForReActiveAndroid = new Note();
dataHolder.setTitle("title from server");
dataHolder.setText("text from server");
dataHolder.setUpdateAt("date from server");
updateViaCRUD(Note.class, dataHolder );
then pass to API to process an do CRUD in one action;
public static Boolean updateViaCRUD(Class<?> table, Model<?> myModelUsedForReActiveAndroid) {
boolean result = false;
//check if data item already exists
//update all values or;
//create new values
//if save success
//result = true;
return result;
}