Reputation: 19
So I have a class named A:
public class A{
private String A1;
private String A2;
private String A3;
private String A4;
private B A5;
private B A6;
}
That as you can see contains some strings and 2 B class typed object. The B class:
public class B{
private ArrayList<C> B1;
}
Contains 1 arraylist of C elements. The C class:
public class C{
private String C1;
private ArrayList<D> C2;
A string and arraylist of D objects. The D class:
public class D{
private String D1;
private Boolean D2;
}
I get the data from JSON files, I build up an arraylist out of A objects, but I should store it in a database because I do not want to download the data every time the user opens the application...
Upvotes: 0
Views: 150
Reputation: 314
You just want to store the custom model object into a database so for this you can use room Persistence database by Google. Check the following link: local database using Roome
Upvotes: 0