Package Database

Class AppointmentDataAccessObject

java.lang.Object
Database.AppointmentDataAccessObject

public class AppointmentDataAccessObject extends Object
Class representing all the methods to query the appointments table
  • Constructor Details

    • AppointmentDataAccessObject

      public AppointmentDataAccessObject()
  • Method Details

    • getAppointmentByAppointmentID

      public static Appointment getAppointmentByAppointmentID(int _appointmentId) throws SQLException
      This function queries an appointment
      Parameters:
      _appointmentId - the appointmentID int value
      Returns:
      the Appointment object
      Throws:
      SQLException
    • getAllAppointments

      public static javafx.collections.ObservableList<Appointment> getAllAppointments() throws SQLException
      This function queries a list of appointments
      Returns:
      [ObservableList] of Appointment objects
      Throws:
      SQLException
    • getAllAppointmentsThisMonth

      public static javafx.collections.ObservableList<Appointment> getAllAppointmentsThisMonth() throws SQLException
      This function queries a list of appointments this month
      Returns:
      [ObservableList] of Appointment objects
      Throws:
      SQLException
    • getAllAppointmentsThisWeek

      public static javafx.collections.ObservableList<Appointment> getAllAppointmentsThisWeek() throws SQLException
      This function queries a list of appointments this week
      Returns:
      [ObservableList] of Appointment objects
      Throws:
      SQLException
    • getAppointmentByUserID

      public static javafx.collections.ObservableList<Appointment> getAppointmentByUserID(int _userId) throws SQLException
      This function queries a list of appointments
      Parameters:
      _userId - the userID int value
      Returns:
      [ObservableList] of Appointment objects
      Throws:
      SQLException
    • getAppointmentByContactID

      public static javafx.collections.ObservableList<Appointment> getAppointmentByContactID(int _contactId) throws SQLException
      This function queries a list of appointments
      Parameters:
      _contactId - the contactID int value
      Returns:
      [ObservableList] of Appointment objects
      Throws:
      SQLException
    • getAppointmentByCustomerID

      public static javafx.collections.ObservableList<Appointment> getAppointmentByCustomerID(int _customerId) throws SQLException
      This function queries a list of appointments
      Parameters:
      _customerId - the customerID int value
      Returns:
      [ObservableList] of Appointment objects
      Throws:
      SQLException
    • getAppointmentByType

      public static javafx.collections.ObservableList<Appointment> getAppointmentByType(String _type) throws SQLException
      This function queries a list of appointments
      Parameters:
      _type - the type String value
      Returns:
      [ObservableList] of Appointment objects
      Throws:
      SQLException
    • deleteAppointmentByAppointmentID

      public static void deleteAppointmentByAppointmentID(int _appointmentId) throws SQLException
      This function deletes an appointment record
      Parameters:
      _appointmentId - the appointmentID int value
      Throws:
      SQLException
    • deleteAppointmentByUserID

      public static void deleteAppointmentByUserID(int _userId) throws SQLException
      This function deletes an appointment record
      Parameters:
      _userId - the userID int value
      Throws:
      SQLException
    • deleteAppointmentByCustomerID

      public static void deleteAppointmentByCustomerID(int _customerId) throws SQLException
      This function deletes an appointment record
      Parameters:
      _customerId - the customerID int value
      Throws:
      SQLException
    • deleteAppointmentByContactID

      public static void deleteAppointmentByContactID(int _contactId) throws SQLException
      This function deletes an appointment record
      Parameters:
      _contactId - the contactID int value
      Throws:
      SQLException
    • addAppointment

      public static void addAppointment(Appointment _appointment)
      This function adds an appointment record
      Parameters:
      _appointment - the Appointment object
    • updateAppointment

      public static void updateAppointment(Appointment _appointment)
      This function update an appointment record
      Parameters:
      _appointment - the Appointment object