Interface DocumentDAO

All Superinterfaces:
DAO<Document>
All Known Implementing Classes:
JDBCDocumentDAO

public interface DocumentDAO extends DAO<Document>
Interfaccia specifica per l'accesso ai dati dei documenti nel database.

Estende l'interfaccia DAO con operazioni dedicate ai documenti, identificati univocamente tramite il loro nome file.

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Verifica se la tabella dei documenti è vuota.
    selectBy(String filename)
    Recupera un documento dal database in base al suo nome file.

    Methods inherited from interface it.unisa.diem.wordageddon_g16.db.contracts.DAO

    delete, insert, selectAll, update
  • Method Details

    • selectBy

      Optional<Document> selectBy(String filename)
      Recupera un documento dal database in base al suo nome file.
      Parameters:
      filename - il nome del file associato al documento da cercare
      Returns:
      un Optional contenente il documento trovato, oppure vuoto se non esiste
    • isEmpty

      boolean isEmpty()
      Verifica se la tabella dei documenti è vuota.
      Returns:
      true se non ci sono documenti salvati, false altrimenti