Study Planet Repository Impl
Implementation of the StudyPlanetRepository interface that communicates with both local and remote data sources. Application of facade pattern to abstract away the implementation details of the data sources.
Parameters
The StudyPlanetApi instance for making remote API calls.
The UserDao for local user-related database operations.
The PlanetDao for local planet-related database operations.
Functions
Authenticates the current user remotely and performs local database operations to store the user and associated planets.
Retrieves a user from the local database based on their remote ID.
Inserts a single planet into the local database.
Inserts a list of planets into the local database.
Logs in a user remotely and performs local database operations to store the user and associated planets.
Registers a new user remotely and performs local database operations to store the user and associated planets.
Initiates the process of discovering a new planet remotely.
Initiates the process of exploring a planet remotely.
Stops the process of discovering a planet remotely and performs local database operations if successful.