@Test public void testReadNoCustomers() throws Exception { assertNull(reader.read()); }
public Statement read() throws Exception, UnexpectedInputException, ParseException { Customer customer = customerReader.read(); if(customer == null) { return null; } else { Statement statement = new Statement(); statement.setCustomer(customer); statement.setSecurityTotal(tickerDao.getTotalValueForCustomer(customer.getId())); statement.setStocks(tickerDao.getStocksForCustomer(customer.getId())); return statement; } }
CustomerStatementReader implements ItemReader<Statement> { public Statement read() throws Exception, UnexpectedInputException, ParseException { Customer customer = customerReader.read(); if(customer == null) { return null; } else { Statement statement = new Statement(); statement.setCustomer(customer); statement.setSecurityTotal(tickerDao.getTotalValueForCustomer(customer.getId())); statement.setStocks(tickerDao.getStocksForCustomer(customer.getId())); return statement; } } }
CustomerStatementReader implements ItemReader<Statement> { public Statement read() throws Exception, UnexpectedInputException, ParseException { Customer customer = customerReader.read(); if(customer == null) { return null; } else { Statement statement = new Statement(); statement.setCustomer(customer); statement.setSecurityTotal(tickerDao.getTotalValueForCustomer(customer.getId())); statement.setStocks(tickerDao.getStocksForCustomer(customer.getId())); return statement; } }  }
CustomerStatementReader implements ItemReader<Statement> { public Statement read() throws Exception, UnexpectedInputException, ParseException { Customer customer = customerReader.read(); if(customer == null) { return null; } else { Statement statement = new Statement(); statement.setCustomer(customer); statement.setSecurityTotal(tickerDao.getTotalValueForCustomer(customer.getId())); statement.setStocks(tickerDao.getStocksForCustomer(customer.getId())); return statement; } }  Statement read(); void setCustomerReader(ItemReader<Customer> customerReader); void setTickerDao(TickerDao tickerDao); }
CustomerStatementReader implements ItemReader<Statement> { public Statement read() throws Exception, UnexpectedInputException, ParseException { Customer customer = customerReader.read(); if(customer == null) { return null; } else { Statement statement = new Statement(); statement.setCustomer(customer); statement.setSecurityTotal(tickerDao.getTotalValueForCustomer(customer.getId())); statement.setStocks(tickerDao.getStocksForCustomer(customer.getId())); return statement; } }  Statement read(); void setCustomerReader(ItemReader<Customer> customerReader); void setTickerDao(TickerDao tickerDao);  }