Q:

How to add all Strings to a ArrayList from a List of objects most efficient?

NB: Please edit the title if you could write it better.. I've no idea how to explain it better..
Over to the problem:
I'm using autocomplete in a javafx form and need to get all the customers firstName into a list for Strings. I've used JPA to get all of the customers from the database. So i'm a bit worried about the speed of my code.. You see why.. 
Code example:
public static List<String> getAllFirstNamesCustomer() {
        List<String> names = new ArrayList<>();
        for (Customer c : CustomerBean.getAllCustomers()) {
            names.add(c.getCName());
        }
        List<String> output =
            new ArrayList<>(new LinkedHashSet<>(names));
        return output;

    }  

EDIT:
Think i found a better way:
public static List<String> getAllFirstNamesCustomer() {
    return em.createNativeQuery("select DISTINCT cname from customer").getResultList();  
}

A:

Good option would be for the  database driver to stream the data.
A workaround and with a larger customer data set, you can leverage Java 8'sparallel streams which takes advantage of all cores of the CPU, with one liner 
List<String> names = CustomerBean.getAllCustomers().parallelStream().map(c.getCName()).collect(toList());

