Package Database
Class AppointmentDataAccessObject
java.lang.Object
Database.AppointmentDataAccessObject
Class representing all the methods to query the appointments table
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddAppointment(Appointment _appointment) This function adds an appointment recordstatic voiddeleteAppointmentByAppointmentID(int _appointmentId) This function deletes an appointment recordstatic voiddeleteAppointmentByContactID(int _contactId) This function deletes an appointment recordstatic voiddeleteAppointmentByCustomerID(int _customerId) This function deletes an appointment recordstatic voiddeleteAppointmentByUserID(int _userId) This function deletes an appointment recordstatic javafx.collections.ObservableList<Appointment>This function queries a list of appointmentsstatic javafx.collections.ObservableList<Appointment>This function queries a list of appointments this monthstatic javafx.collections.ObservableList<Appointment>This function queries a list of appointments this weekstatic AppointmentgetAppointmentByAppointmentID(int _appointmentId) This function queries an appointmentstatic javafx.collections.ObservableList<Appointment>getAppointmentByContactID(int _contactId) This function queries a list of appointmentsstatic javafx.collections.ObservableList<Appointment>getAppointmentByCustomerID(int _customerId) This function queries a list of appointmentsstatic javafx.collections.ObservableList<Appointment>getAppointmentByType(String _type) This function queries a list of appointmentsstatic javafx.collections.ObservableList<Appointment>getAppointmentByUserID(int _userId) This function queries a list of appointmentsstatic voidupdateAppointment(Appointment _appointment) This function update an appointment record
-
Constructor Details
-
AppointmentDataAccessObject
public AppointmentDataAccessObject()
-
-
Method Details
-
getAppointmentByAppointmentID
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 SQLExceptionThis function queries a list of appointments- Returns:
- [ObservableList] of Appointment objects
- Throws:
SQLException
-
getAllAppointmentsThisMonth
public static javafx.collections.ObservableList<Appointment> getAllAppointmentsThisMonth() throws SQLExceptionThis function queries a list of appointments this month- Returns:
- [ObservableList] of Appointment objects
- Throws:
SQLException
-
getAllAppointmentsThisWeek
public static javafx.collections.ObservableList<Appointment> getAllAppointmentsThisWeek() throws SQLExceptionThis 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
This function deletes an appointment record- Parameters:
_appointmentId- the appointmentID int value- Throws:
SQLException
-
deleteAppointmentByUserID
This function deletes an appointment record- Parameters:
_userId- the userID int value- Throws:
SQLException
-
deleteAppointmentByCustomerID
This function deletes an appointment record- Parameters:
_customerId- the customerID int value- Throws:
SQLException
-
deleteAppointmentByContactID
This function deletes an appointment record- Parameters:
_contactId- the contactID int value- Throws:
SQLException
-
addAppointment
This function adds an appointment record- Parameters:
_appointment- the Appointment object
-
updateAppointment
This function update an appointment record- Parameters:
_appointment- the Appointment object
-