@Test public void findAllBornFrom(){ final LocalDate jackBirthDate = LocalDate.parse("1966-12-31"); final Client jack = new Client("jack", jackBirthDate); final LocalDate chloeBirthDate = LocalDate.parse("1977-01-01"); final Client chloe = new Client("chloe", chloeBirthDate); testee.save(jack); testee.save(chloe); { final List<Client> clients = testee.findAll(); assertEquals(Arrays.asList(chloe, jack), clients); } { final List<Client> clients = testee.findAllBornFrom(jackBirthDate); assertEquals(Arrays.asList(chloe, jack), clients); } { final List<Client> clients = testee.findAllBornFrom(jackBirthDate.plusDays(1)); assertEquals(Arrays.asList(chloe), clients); } { final List<Client> clients = testee.findAllBornFrom(chloeBirthDate); assertEquals(Arrays.asList(chloe), clients); } { final List<Client> clients = testee.findAllBornFrom(chloeBirthDate.plusDays(1)); assertEquals(Arrays.asList(), clients); } }
public List<Client> findAllBornFrom(final LocalDate minDate){ return impl.findAllByBirthDateGreaterThanEqualOrderByBirthDateDescIdDesc(minDate); }
ClientJpaRepository implements ClientRepository { public List<Client> findAllBornFrom(final LocalDate minDate){ return impl.findAllByBirthDateGreaterThanEqualOrderByBirthDateDescIdDesc(minDate); } }
ClientJpaRepository implements ClientRepository { public List<Client> findAllBornFrom(final LocalDate minDate){ return impl.findAllByBirthDateGreaterThanEqualOrderByBirthDateDescIdDesc(minDate); } @Autowired  ClientJpaRepository(final ImportedClientJpaRepository impl); }
ClientJpaRepository implements ClientRepository { public List<Client> findAllBornFrom(final LocalDate minDate){ return impl.findAllByBirthDateGreaterThanEqualOrderByBirthDateDescIdDesc(minDate); } @Autowired  ClientJpaRepository(final ImportedClientJpaRepository impl); void deleteAll(); Client save(final Client client); void delete(Client client); @Override Optional<Client> find(Long id); @Override Optional<Client> find(String username); List<Client> findAll(); List<Client> findAllBornFrom(final LocalDate minDate); }
ClientJpaRepository implements ClientRepository { public List<Client> findAllBornFrom(final LocalDate minDate){ return impl.findAllByBirthDateGreaterThanEqualOrderByBirthDateDescIdDesc(minDate); } @Autowired  ClientJpaRepository(final ImportedClientJpaRepository impl); void deleteAll(); Client save(final Client client); void delete(Client client); @Override Optional<Client> find(Long id); @Override Optional<Client> find(String username); List<Client> findAll(); List<Client> findAllBornFrom(final LocalDate minDate);  }