Class QRCodeController
java.lang.Object
com.example.iconic_raffleevent.controller.QRCodeController
Controller class to manage QR code data from the Event collection.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceCallback interface for Firestore updates.static interfaceCallback interface for fetching QR code data. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new QRCodeController and initializes the Firebase Firestore instance. -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteQRCodeFromEvent(String eventId, QRCodeController.FirestoreUpdateCallback callback) Deletes the QR code data from the specified event in Firestore.voidRetrieves all QR code data from the Event collection in Firestore.
-
Field Details
-
db
public com.google.firebase.firestore.FirebaseFirestore db
-
-
Constructor Details
-
QRCodeController
public QRCodeController()Constructs a new QRCodeController and initializes the Firebase Firestore instance.
-
-
Method Details
-
getAllQRCodeData
Retrieves all QR code data from the Event collection in Firestore.- Parameters:
callback- The callback interface to handle the fetched QR code data or error.
-
deleteQRCodeFromEvent
public void deleteQRCodeFromEvent(String eventId, QRCodeController.FirestoreUpdateCallback callback) Deletes the QR code data from the specified event in Firestore.- Parameters:
eventId- The ID of the event to update.callback- The callback interface to handle success or error responses.
-