package com.adobe.services; import java.util.ArrayList; import java.util.Date; import com.adobe.objects.SimpleCustomer; public class SimpleCustomerService { public SimpleCustomerService() { } /** * Returns SimpleCustomer objects * In this sample we are generating dummy SimpleCustomer objects * You can replace the code to connect to a database and create objects * based on the data in the database. */ public ArrayList getAllCustomers() { ArrayList customers = null; try { int numberOfCustomers = 20; SimpleCustomer customer = null; customers = new ArrayList(); for(int loopCounter = 1;loopCounter<=numberOfCustomers;loopCounter++) { customer = new SimpleCustomer(); customer.setCustomerId(loopCounter); customer.setCustomerName("Customer " + loopCounter); customer.setCustomerType("Organization " + loopCounter); customer.setCustomerAddress("Road # " + loopCounter + ", Bangalore, India"); customer.setEntryModifiedDate(new Date()); customers.add(customer); } } catch(Exception e) { throw new RuntimeException(e); } return customers; } }