Package backend.plenarprotocol
Class PlenarprotocolDAO
java.lang.Object
backend.plenarprotocol.PlenarprotocolDAO
DAO für Plenarprotokolle
- Author:
- Philipp Hein
-
Constructor Summary
ConstructorsConstructorDescriptionAlternative Konstruktor.PlenarprotocolDAO(MongoDBHandler dbHandler) Standardkonstruktor. -
Method Summary
Modifier and TypeMethodDescriptionGibt alle Protokolle zurückSimple implementation using find().sort().limit(1) with projection This is more efficient for large collections as it only retrieves the needed fieldGibt das Protokoll anhand der ID zurückGibt Anzahl der Protokolle zurück
-
Constructor Details
-
PlenarprotocolDAO
Standardkonstruktor.- Parameters:
dbHandler- MongoDBHandler
-
PlenarprotocolDAO
Alternative Konstruktor. Der MongoDBHandler wird hier nicht benötigt.- Throws:
IOException
-
-
Method Details
-
getProtocolById
Gibt das Protokoll anhand der ID zurück- Parameters:
id- Protokoll-ID- Returns:
- Plenarprotocol_impl Objekt
-
getAllProtocols
Gibt alle Protokolle zurück- Returns:
- Liste aller Plenarprotocol_impl Objekte
-
getProtocolsAmount
Gibt Anzahl der Protokolle zurück- Returns:
- Anzahl an Plenarprotokollen in der DB
-
getMaxProtocolIndex
Simple implementation using find().sort().limit(1) with projection This is more efficient for large collections as it only retrieves the needed field- Returns:
- The maximum value of protocol.index or 1 if no protocols exist
-