Class OrganizerDB

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

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

    • getInstance

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

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

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

      public void setOrganizerChangeListener(OrganizerDB.OrganizerChangeListener listener)
      Set the listener for changes in the organizers collection.
      Parameters:
      listener - the listener for changes in the organizers collection
    • updateOrganizer

      public void updateOrganizer(String deviceId, ArrayList<String> eventIds)
      Update the organizer in the Firestore database.
      Parameters:
      deviceId - the device ID of the organizer
      eventIds - the list of event IDs