Class PlenarprotocolDAO

java.lang.Object
backend.plenarprotocol.PlenarprotocolDAO

public class PlenarprotocolDAO extends Object
DAO für Plenarprotokolle
Author:
Philipp Hein
  • Constructor Details

    • PlenarprotocolDAO

      public PlenarprotocolDAO(MongoDBHandler dbHandler)
      Standardkonstruktor.
      Parameters:
      dbHandler - MongoDBHandler
    • PlenarprotocolDAO

      public PlenarprotocolDAO() throws IOException
      Alternative Konstruktor. Der MongoDBHandler wird hier nicht benötigt.
      Throws:
      IOException
  • Method Details

    • getProtocolById

      public Plenarprotocol_impl getProtocolById(String id)
      Gibt das Protokoll anhand der ID zurück
      Parameters:
      id - Protokoll-ID
      Returns:
      Plenarprotocol_impl Objekt
    • getAllProtocols

      public List<Plenarprotocol_impl> getAllProtocols()
      Gibt alle Protokolle zurück
      Returns:
      Liste aller Plenarprotocol_impl Objekte
    • getProtocolsAmount

      public Long getProtocolsAmount()
      Gibt Anzahl der Protokolle zurück
      Returns:
      Anzahl an Plenarprotokollen in der DB
    • getMaxProtocolIndex

      public Integer 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