class CustomerUpdateWriter implements ItemWriter<CustomerUpdate> {

	private CustomerDao customerDao;

	@Override
	public void write(Chunk<? extends CustomerUpdate> items) throws Exception {<FILL_FUNCTION_BODY>}

	public void setCustomerDao(CustomerDao customerDao) {
		this.customerDao = customerDao;
	}

}

		for (CustomerUpdate customerUpdate : items) {
			if (customerUpdate.getOperation() == CustomerOperation.ADD) {
				customerDao.insertCustomer(customerUpdate.getCustomerName(), customerUpdate.getCredit());
			}
			else if (customerUpdate.getOperation() == CustomerOperation.UPDATE) {
				customerDao.updateCustomer(customerUpdate.getCustomerName(), customerUpdate.getCredit());
			}
		}

		// flush and/or clear resources
	
<no_super_class>