Interface AgendaDAO

All Known Implementing Classes:
AgendaDAOImpl

public interface AgendaDAO
  • Method Details

    • saveAppointment

      boolean saveAppointment​(Appointment appuntamento) throws java.io.IOException
      Parameters:
      appuntamento - new appointment to insert in the database
      Returns:
      return true if the appointment is saved,false otherwise
      Throws:
      java.io.IOException
    • findAppointmetsByEmail

      java.util.List<Appointment> findAppointmetsByEmail​(java.lang.String mail) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
      Parameters:
      mail - customer's email
      Returns:
      return all the customer's appointment
      Throws:
      java.io.IOException
      java.util.concurrent.ExecutionException
      java.lang.InterruptedException
    • findAppointmentByDate

      java.util.List<Appointment> findAppointmentByDate​(java.lang.String date) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
      Parameters:
      date - date to check appointment
      Returns:
      returns all appointments for a given date
      Throws:
      java.io.IOException
      java.util.concurrent.ExecutionException
      java.lang.InterruptedException
    • deleteappointment

      boolean deleteappointment​(Appointment appuntamento) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
      Parameters:
      appuntamento - appointment to delete
      Returns:
      true if the appointment is deleted
      Throws:
      java.io.IOException
      java.util.concurrent.ExecutionException
      java.lang.InterruptedException
    • insertAvailability

      boolean insertAvailability​(Availability availability) throws java.io.IOException
      interact with database to insert the availability.
      Parameters:
      availability - the availability to insert into database
      Returns:
      true if the insertion is done, false otherwise.
      Throws:
      java.io.IOException
    • findAvailabilityByDate

      java.util.List<Availability> findAvailabilityByDate​(java.lang.String date) throws java.util.concurrent.ExecutionException, java.io.IOException, java.lang.InterruptedException
      return the availability list from the date in input.
      Parameters:
      date - for find availability
      Returns:
      availability list for this date
      Throws:
      java.util.concurrent.ExecutionException
      java.io.IOException
      java.lang.InterruptedException
    • deleteAvailability

      boolean deleteAvailability​(Availability availability) throws java.io.IOException, java.util.concurrent.ExecutionException, java.lang.InterruptedException
      enable to remove the availability.
      Parameters:
      availability - the availability to remove
      Returns:
      true if the remove is done.
      Throws:
      java.io.IOException
      java.util.concurrent.ExecutionException
      java.lang.InterruptedException
    • findAvailabilityByDateAndTime

      Availability findAvailabilityByDateAndTime​(java.lang.String date, int time) throws java.io.IOException, java.lang.InterruptedException, java.util.concurrent.ExecutionException
      retrieve the availability with this time and date.
      Parameters:
      date -
      time -
      Returns:
      the availability that contains this time and date.
      Throws:
      java.io.IOException
      java.lang.InterruptedException
      java.util.concurrent.ExecutionException