package javaphone;

import java.util.ArrayList;
import java.util.HashMap;

/**
 *
 * @author iGroup
 */
public class CustomerList extends ArrayList<HashMap> {

    private final DataFileIO customerDataFile;

    public CustomerList() {
        customerDataFile = new DataFileIO("customers.xml", "customers", "customer");
        this.addAll(customerDataFile.read());
    }

    public ArrayList filter(User user, Service service) {
        return null;
    }

    public ArrayList getCustomerData(Customer customer) {
        return null;
    }

    public boolean changeCustomerData(Customer customer, HashMap customerData) {
        return true;
    }

    public int getCustomerNoByService(Service service) {
        return 0;
    }

    public void prepareReport() {
    }

    public String getNextContract() {
        return null;
    }

}

@@ -74,16 +74,112 @@
 %0A%0A/**%0A *
+ This class handles the customers information when %0A * searching for the customer id number.%0A * 
 %0A * @aut
@@ -296,16 +296,74 @@
 taFile;%0A
+    %0A    /**%0A     * Adds customer to the datafile.%0A     */
 %0A    pub
@@ -529,284 +529,566 @@
     
-public ArrayList filter(User user, Service service) %7B
+/**%0A     * Searches for customer with specific customerId%0A     * @param customerId%0A     * @return customer data as HashMap if customer found 
 %0A   
+  *
      
-return null;%0A    %7D%0A%0A    public ArrayList getCustomerData(Customer customer) %7B%0A        return null;%0A    %7D%0A%0A    public boolean changeCustomerData(Customer customer, HashMap customerData) %7B
+    null if customer not found%0A     */     %0A    public HashMap getServiceById(int customerId) %7B%0A        for (HashMap customer : this) %7B%0A            if (customerId == (int) customer.get(%22customerId%22)) %7B%0A                return customer;%0A            %7D%0A        %7D%0A        return null;%0A    %7D%0A%0A    /**%0A     * Gets the number of customers by service.%0A     * @param serviceId
 %0A     
-   
+* @
 return 
-true;
+customer number
 %0A    
-%7D%0A
+ */
 %0A   
@@ -1114,10 +1114,13 @@
 omer
-No
+Count
 BySe
@@ -1129,23 +1129,19 @@
 ice(
-Service
+int
  service
 ) %7B%0A
@@ -1136,16 +1136,18 @@
  service
+Id
 ) %7B%0A    
@@ -1170,49 +1170,166 @@
   %7D%0A
-%0A    public void prepareReport() %7B%0A    %7D%0A
+    %0A    /**%0A     * Prepares the report%0A     */%0A    public void prepareReport() %7B%0A    %7D%0A    %0A    /**%0A     * Gets the next contract%0A     * @return null%0A     */
 %0A   

Update CustomerList.java