Package model.DAO

Class FaqDAO

java.lang.Object
model.DAO.FaqDAO
All Implemented Interfaces:
DAO<FAQ>

public final class FaqDAO
extends java.lang.Object
implements DAO<FAQ>
  • Constructor Summary

    Constructors
    Constructor Description
    FaqDAO()  
  • Method Summary

    Modifier and Type Method Description
    boolean delete​(FAQ entity)  
    FAQ extract​(java.sql.ResultSet resultSet)  
    java.util.List<FAQ> getAll()  
    FAQ getById​(int id)  
    boolean save​(FAQ entity)  
    boolean update​(FAQ entity)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FaqDAO

      public FaqDAO()
  • Method Details

    • getById

      public FAQ getById​(int id)
      Specified by:
      getById in interface DAO<FAQ>
      Parameters:
      id - rappresenta l'identificativo dell'entity
      Returns:
      null se non viene trovato nessun risultato, un'istanza di T nel caso in cui viene trovato un risultato
    • getAll

      public java.util.List<FAQ> getAll()
      Specified by:
      getAll in interface DAO<FAQ>
      Returns:
      una lista di entity T
    • save

      public boolean save​(FAQ entity)
      Specified by:
      save in interface DAO<FAQ>
      Parameters:
      entity - l'istanza da salvare
      Returns:
      false --> se l'operazione non va a buon fine, true --> se l'operazione va a buon fine
    • update

      public boolean update​(FAQ entity)
      Specified by:
      update in interface DAO<FAQ>
      Parameters:
      entity - l'istanza da aggiornare
      Returns:
      false --> se l'operazione non va a buon fine, true --> se l'operazione va a buon fine
    • delete

      public boolean delete​(FAQ entity)
      Specified by:
      delete in interface DAO<FAQ>
      Parameters:
      entity - l'istanza da eliminare
      Returns:
      false --> se l'operazione non va a buon fine, true --> se l'operazione va a buon fine
    • extract

      public FAQ extract​(java.sql.ResultSet resultSet) throws java.sql.SQLException
      Specified by:
      extract in interface DAO<FAQ>
      Parameters:
      resultSet - resultSet della query eseguita
      Returns:
      l'istanza della della classe T popolata con le informazioni presenti nel resultSet
      Throws:
      java.sql.SQLException - eccezione lanciata in caso di problemi