Class ProfileDB

java.lang.Object
com.example.slacks_lottoevent.database.ProfileDB

public class ProfileDB extends Object
ProfileDB is a singleton class that manages the Firestore database for profiles.
  • Method Details

    • getInstance

      public static ProfileDB getInstance()
      Get the singleton instance of ProfileDB.
      Returns:
      The singleton instance of ProfileDB.
    • startListening

      public void startListening()
      Start listening to Firestore updates for the profiles collection.
    • stopListening

      public void stopListening()
      Stop listening to Firestore updates.
    • setProfileChangeListener

      public void setProfileChangeListener(ProfileDB.ProfileChangeListener listener)
      Set the listener for profile changes.
      Parameters:
      listener - the listener for profile changes
    • updateProfile

      public void updateProfile(Profile profile)
      Get the profiles cache.
      Parameters:
      profile - the profile to add to the cache