Well, as long as you understand it, there is no storage and you just want to model the classes between classes. Here, in principle, you can simply apply directly, but when the base is already there, I would create some class on top of this base in order to unify all the calls to the base and forward them through this class. That then it was easier to change the base.
Let me explain, let's say you have a class SomeDatabase and a method in getAllMarkersFromDB (), you are on top of the class that works with the database, you are sawing another class, call it valid MarkersRepository and add the method getAllMarkers () to it, and in this method you call SomeDatabase # getAllMarkersFromDB () ). Everywhere in the code you are working with the MarkersRepository class. This is such an encapsulation, if you want to later change the database, then simply rewrite the getAllMarkers () method and you will not need to change anything in the whole project. The description of course is difficult, but in practice it is easier to do.