Package Database
Class ContactDataAccessObject
java.lang.Object
Database.ContactDataAccessObject
Class representing all the methods to query the contacts table
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddContact(Contact _contact) This function adds a contact recordstatic voiddeleteContactByContactID(int _contactId) This function deletes a contact recordstatic voiddeleteContactByDivisionID(int _email) This function deletes a contact recordstatic javafx.collections.ObservableList<Contact>This function queries a list of contactsstatic ContactgetContactByContactID(int _contactId) This function queries a contactstatic javafx.collections.ObservableList<Contact>getContactByEmail(int _email) This function queries a list of contactsstatic voidupdateContact(Contact _contact) This function update a contact record
-
Constructor Details
-
ContactDataAccessObject
public ContactDataAccessObject()
-
-
Method Details
-
getContactByContactID
This function queries a contact- Parameters:
_contactId- the contactID int value- Returns:
- the Contact object
- Throws:
SQLException
-
getAllContacts
This function queries a list of contacts- Returns:
- [ObservableList] of Contact objects
- Throws:
SQLException
-
getContactByEmail
public static javafx.collections.ObservableList<Contact> getContactByEmail(int _email) throws SQLException This function queries a list of contacts- Parameters:
_email- the email string value- Returns:
- [ObservableList] of Contact objects
- Throws:
SQLException
-
deleteContactByContactID
This function deletes a contact record- Parameters:
_contactId- the contactID int value- Throws:
SQLException
-
deleteContactByDivisionID
This function deletes a contact record- Parameters:
_email- the email string value- Throws:
SQLException
-
addContact
This function adds a contact record- Parameters:
_contact- the Contact object
-
updateContact
This function update a contact record- Parameters:
_contact- the Contact object
-