Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass Data and Set All Data #57

Open
bhapps opened this issue Apr 19, 2019 · 0 comments
Open

Pass Data and Set All Data #57

bhapps opened this issue Apr 19, 2019 · 0 comments

Comments

@bhapps
Copy link

bhapps commented Apr 19, 2019

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;

}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant