Implementing Factory pattern

Hi guys, as part of an exercise I was involved with, I had to use the factory pattern to create a series of different objects, however I'd like to keep a list or map for what it matters of these objects and I'm getting a bit into troubles here.
So basically, I have a CSV file containing some data which I'd like to use to construct my objects: the data in the spreadsheet is arranged in the following cols:
name, surname, date_of_birth, type
and I'm essentially reading from the spreadsheet and using the factory pattern I'm building a series of Employee objects, either full time or part time (that's stored inside the type column in the spreadsheet).
This has been done but I'd like to keep a list of all the employees, regardless of whether they are full time or part time and I'm not sure how and where to populate that list, that's why I got a bit stack.
Here is what I've done (in a nutshell)

  • I have an abstract Employee class which is my model
  • a FulltimeEmployee and ParttimeEmployee concrete classes implementing the EMployee class
  • an EmployeeFactory class which determines whether the employee is part time or full time and builds the objects accordingly
  • a ReadData class which reads the spreadsheet and calls the factory class with the data needed to build the objects
  • a EmployeeTestingMain with main which creates a ReadData object and kicks off everything.

Ideally I'd like to keep a list of all these objects in my main class, but considering the above that's not entirely possible. So my question is, where do I create this list and where do I populate it from?
I feel that the list should be populated from the factory class because this is where I'm creating the full time/part time objects but then for me to access it form the main class I'd have to create this list as a static, and I'm not convinced. What are your thoughts?
I'm including the code below, just so you have an idea of what I've done.

Employee

package com.factoryPattern.model;

public abstract class Employee {

    private String name;
    private String surname;
    private String dob;
    private String type;

    public Employee(String name, String surname, String dob, String type) {
        this.name = name;
        this.surname = surname;
        this.dob = dob;
        if(type != null) {
            this.type = type;
        }
        else {
            this.type = "unspecified";
        }

    }

    public String getName() {
        return name;
    }

    public String getSurname() {
        return surname;
    }

    public String getDob() {
        return dob;
    }

    public String getType() {
        return type;
    }

    @Override
    public String toString() {
        return "Employee [name=" + name + ", surname=" + surname + ", dob=" + dob + ", type=" + type + "]";
    }

    public abstract void printDetails();

}

FullTimeEmployee

package com.factoryPattern.impl;

import com.factoryPattern.model.Employee;

public class FulltimeEmployee extends Employee{

    public FulltimeEmployee(String name, String surname, String dob, String type) {
        super(name, surname, dob, type);
    }
    @Override
    public void printDetails() {
        System.out.println("This is a full time employer");
        System.out.println(super.toString());       
    }

}

PartTimeEmployee

package com.factoryPattern.impl;

import com.factoryPattern.model.Employee;

public class PartimeEmployee extends Employee {

    public PartimeEmployee(String name, String surname, String dob, String type) {
        super(name, surname, dob, type);
    }

    @Override
    public void printDetails() {
        System.out.println("This is a part time employer");
        System.out.println(super.toString());
    }

}

EmployeeFactory

package com.factoryPattern.factory;

import com.factoryPattern.impl.FulltimeEmployee;
import com.factoryPattern.impl.PartimeEmployee;
import com.factoryPattern.model.Employee;

public class EmployeeFactory {
    public static void buildEmployee(String name, String surname, String dob, String type) {
        Employee employee = null;
        switch(type) {
        case "part_time":
            employee = new PartimeEmployee(name, surname, dob, type);
            employee.printDetails();
            break;
        case "full_time":
            employee = new FulltimeEmployee(name, surname, dob, type);
            employee.printDetails();
            break;          
        }

    }
}

ReadData

package com.facrotyPattern.fileReaders;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;

import com.factoryPattern.factory.EmployeeFactory;

import java.io.FileReader;

public class ReadData {
    private static final String READ_FILE_PATH = System.getProperty("user.dir") + "/Files/employees.csv";
    private static final String COMMA_DELIMITER = ",";
    //private Map<String, String> employeeProperties = new HashMap<String, String>();

    public void readDataFromDoc() {
        BufferedReader br = null;
        try {
            br = new BufferedReader(new FileReader(READ_FILE_PATH));
            String line = "";           
            br.readLine();          
            while ((line = br.readLine()) != null) 
           {
               String[] employeeDetails = line.split(COMMA_DELIMITER);
               for (int i = 0; i < employeeDetails.length; i++) {
                   //System.out.println(employeeDetails[i]);

               }
               EmployeeFactory.buildEmployee(employeeDetails[0], employeeDetails[1], employeeDetails[2], employeeDetails[3]);
               //populateMap(employeeDetails);

           }

        }
        catch (FileNotFoundException e) {
            e.printStackTrace();
        } 

       catch (IOException e) {
            e.printStackTrace();
        }

       finally {
            try {
                br.close();
            }
            catch(IOException ie) {
                System.out.println("Error occured while closing the BufferedReader");
                ie.printStackTrace();
            }
       }

    }

//  private void populateMap(String[] employeeDetails) {
//      employeeProperties.put("name", employeeDetails[0]);
//      employeeProperties.put("surname", employeeDetails[1]);
//      employeeProperties.put("date_of_birth", employeeDetails[2]);
//      employeeProperties.put("type", employeeDetails[3]);
//      
//          
//  }
}

Main class

package com.factoryPattern.testingClass;

import com.facrotyPattern.fileReaders.ReadData;

public class EmployeeTestingMain {

    public static void main(String[] args) {

        ReadData fileReader = new ReadData();
        fileReader.readDataFromDoc();

    }

}

Sorting ArrayList with a comparator, how to

Hi guys, I was trying to sort an arrayList using a comparator but I didn't have much luck, or at least it seems like there is something slightly wrong with it.
I have these objects in the arrayList

employeeCollection.add(new Employee("Dan", 112));
employeeCollection.add(new Employee("Tim", 2));
employeeCollection.add(new Employee("Rick", 11));
employeeCollection.add(new Employee("Jack", 19));
employeeCollection.add(new Employee("Sid", 1));

and before sorting I have this

Name: Dan: 
ID number: 112:
Name: Tim: 
ID number: 2:
Name: Rick: 
ID number: 11:
Name: Jack: 
ID number: 19:
Name: Sid: 
ID number: 1:

and after sorting I have this:

Name: Dan: 
ID number: 112:
Name: Jack: 
ID number: 19:
Name: Rick: 
ID number: 11:
Name: Sid: 
ID number: 1:
Name: Tim: 
ID number: 2:

so it didn't go that well. Here is the code I've used, and the questions are:
-why isn't this sorted properly?
-what would I need to do to sort it in ascending order

/*
 * This tests Array list of employees*/
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;

public class TestCollections {
    private static List<Employee> employeeCollection = new ArrayList<Employee>();

    public static void main(String[] args) {
        createEmployees();

    }

    private static void createEmployees() {
//      for(int i = 0; i < 10; i++) {
//          Employee employee = new Employee("Jo_" + i, i);
//          employeeCollection.add(employee);
//      }
        employeeCollection.add(new Employee("Dan", 112));
        employeeCollection.add(new Employee("Tim", 2));
        employeeCollection.add(new Employee("Rick", 11));
        employeeCollection.add(new Employee("Jack", 19));
        employeeCollection.add(new Employee("Sid", 1));

        printEmployees();

        //Collections.sort(employeeCollection);
        // Sorting
        Collections.sort(employeeCollection, new Comparator<Employee>() {
            @Override
            public int compare(Employee employee, Employee employee1)
            {

                return  employee.getName().compareTo(employee1.getName());
            }
        });

        printEmployees();
    }

    private static void printEmployees() {
        employeeCollection.forEach(listItem -> System.out.println(listItem));

    }

}

and the Employee class

public class Employee {

    private String name;
    private int idNumber;

    public Employee(String name, int idNumber) {    
        this.name = name;
        this.idNumber = idNumber;
    }

    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public int getIdNumber() {
        return idNumber;
    }
    public void setIdNumber(int idNumber) {
        this.idNumber = idNumber;
    }

    @Override
    public String toString() {
        return String.format("%s: %s: \n%s: %d:", "Name", getName(), "ID number", getIdNumber());
    }

    // Overriding the compareTo method
   public int compareTo(Employee employee) {
      return (this.name).compareTo(employee.name);
   }

   // Overriding the compare method to sort the age 
   public int compare(Employee employee, Employee employee1) {
      return employee.idNumber - employee1.idNumber;
   }
}