Package Database
Class CustomerDataAccessObject
java.lang.Object
Database.CustomerDataAccessObject
Class representing all the methods to query the customers table
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addCustomer
(Customer _customer) This function adds a customer recordstatic void
deleteCustomerByCustomerID
(int _customerId) This function deletes a customer recordstatic void
deleteCustomerByDivisionID
(int _divisionId) This function deletes a customer recordstatic javafx.collections.ObservableList<Customer>
This function queries a list of customersstatic Customer
getCustomerByCustomerID
(int _customerId) This function queries a customerstatic javafx.collections.ObservableList<Customer>
getCustomerByDivisionID
(int _divisionId) This function queries a list of customersstatic void
updateCustomer
(Customer _customer) This function update a customer record
-
Constructor Details
-
CustomerDataAccessObject
public CustomerDataAccessObject()
-
-
Method Details
-
getCustomerByCustomerID
This function queries a customer- Parameters:
_customerId
- the customerID int value- Returns:
- the Customer object
- Throws:
SQLException
-
getAllCustomers
This function queries a list of customers- Returns:
- [ObservableList] of Customer objects
- Throws:
SQLException
-
getCustomerByDivisionID
public static javafx.collections.ObservableList<Customer> getCustomerByDivisionID(int _divisionId) throws SQLException This function queries a list of customers- Parameters:
_divisionId
- the divisionID int value- Returns:
- [ObservableList] of Customer objects
- Throws:
SQLException
-
deleteCustomerByCustomerID
This function deletes a customer record- Parameters:
_customerId
- the customerID int value- Throws:
SQLException
-
deleteCustomerByDivisionID
This function deletes a customer record- Parameters:
_divisionId
- the divisionId int value- Throws:
SQLException
-
addCustomer
This function adds a customer record- Parameters:
_customer
- the Customer object
-
updateCustomer
This function update a customer record- Parameters:
_customer
- the Customer object
-