@Test public void testFindAll() { List<Address> results = addressDao.findAll(); assertNotSame(0, results.size()); for(Address address : results) { System.out.println(address.getCity()); } }
@Override public List<Address> findAll() { return this.jdbcTemplate.query( "select id, street, city, country from address", addressMapper()); }
AddressDaoJDBC implements AddressDao { @Override public List<Address> findAll() { return this.jdbcTemplate.query( "select id, street, city, country from address", addressMapper()); } }
AddressDaoJDBC implements AddressDao { @Override public List<Address> findAll() { return this.jdbcTemplate.query( "select id, street, city, country from address", addressMapper()); } @Autowired  AddressDaoJDBC(DataSource dataSource); }
AddressDaoJDBC implements AddressDao { @Override public List<Address> findAll() { return this.jdbcTemplate.query( "select id, street, city, country from address", addressMapper()); } @Autowired  AddressDaoJDBC(DataSource dataSource); @Override List<Address> findAll(); }
AddressDaoJDBC implements AddressDao { @Override public List<Address> findAll() { return this.jdbcTemplate.query( "select id, street, city, country from address", addressMapper()); } @Autowired  AddressDaoJDBC(DataSource dataSource); @Override List<Address> findAll();  }