DatabaseCommunication
Class CustomerManager

java.lang.Object
  extended byDatabaseCommunication.CustomerManager

public class CustomerManager
extends java.lang.Object

Author:
student This class is being used for communication with the application Database with information relevant to Customers.

Field Summary
private  java.sql.Connection con
           
 
Constructor Summary
CustomerManager()
          This is the constructor for CustomerManager.java
 
Method Summary
private  boolean insertCoffeePreference(Customer_Data customer)
          This method is being used for inserting the coffee preference that a customer has.
 boolean insertCustomer(Customer_Data customer)
          This method is being used for inserting new Customers into the application database.
private  boolean readCoffeePreference(Customer_Data customer)
          This method is being used for reading particular coffeepreference details given a customer.
 boolean readCustomer(Customer_Data customer)
          This method is being used for reading particular customer details given a Customer_Data with a matching username.
 boolean updateCoffeePreference(Customer_Data customer)
          This method is being used for updating the coffee preference for a particular customer.
 boolean updateCustomer(Customer_Data customer)
          This method is being used for updating the given customer's account balances.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

con

private java.sql.Connection con
Constructor Detail

CustomerManager

public CustomerManager()
This is the constructor for CustomerManager.java

Method Detail

insertCoffeePreference

private boolean insertCoffeePreference(Customer_Data customer)
This method is being used for inserting the coffee preference that a customer has.

Parameters:
customer - The customer whose coffee preference is to added to the application database.
Returns:
boolean Specifies whether the adding of the coffee preference was successful.

insertCustomer

public boolean insertCustomer(Customer_Data customer)
This method is being used for inserting new Customers into the application database.

Parameters:
customer - The customer that is to added to the application database.
Returns:
boolean Specifies whether the adding of customer was successful.

readCoffeePreference

private boolean readCoffeePreference(Customer_Data customer)
This method is being used for reading particular coffeepreference details given a customer.

Parameters:
customer - The customer whose coffee preference is to be retrieved.
Returns:
boolean Specifies whether reading the coffee preference was successful.

readCustomer

public boolean readCustomer(Customer_Data customer)
This method is being used for reading particular customer details given a Customer_Data with a matching username.

Parameters:
customer - The customer whose details are to be retrieved from the application database.
Returns:
boolean Specifies whether reading the customer details was successful.

updateCoffeePreference

public boolean updateCoffeePreference(Customer_Data customer)
This method is being used for updating the coffee preference for a particular customer.

Parameters:
customer - The customer whose coffee preference is to be updated.
Returns:
boolean Specifies whether the update was successful.

updateCustomer

public boolean updateCustomer(Customer_Data customer)
This method is being used for updating the given customer's account balances.

Parameters:
customer - The customer whose account details are to be updated.
Returns:
boolean Specifies whether the customer update was successful.