@Override
    public Customer getRowData(String rowKey) {
        for (Customer customer : datasource) {
            if (customer.getId() == Integer.parseInt(rowKey)) {
                return customer;
            }
        }

        return null;
    }
Dummy implementation of LazyDataModel that uses a list to mimic a real datasource like a database.
primefaces-showcase/src/main/java/org/primefaces/showcase/view/data/datatable/LazyCustomerDataModel.java