@Test public void testFindById() { Customer result = repository.findById(100L); assertThat(result, is(notNullValue())); assertThat(result.getFirstName(), is("John")); }
@Override @Transactional(readOnly = true) public Customer findById(Long id) { if (id == null) { return null; } return findOne(qCustomer.id.eq(id)); }
QueryDslCustomerRepository implements CustomerRepository { @Override @Transactional(readOnly = true) public Customer findById(Long id) { if (id == null) { return null; } return findOne(qCustomer.id.eq(id)); } }
QueryDslCustomerRepository implements CustomerRepository { @Override @Transactional(readOnly = true) public Customer findById(Long id) { if (id == null) { return null; } return findOne(qCustomer.id.eq(id)); }  }
QueryDslCustomerRepository implements CustomerRepository { @Override @Transactional(readOnly = true) public Customer findById(Long id) { if (id == null) { return null; } return findOne(qCustomer.id.eq(id)); }  @Autowired void setDataSource(DataSource dataSource); @Override @Transactional(readOnly = true) Customer findById(Long id); @Override @Transactional(readOnly = true) List<Customer> findAll(); @Override @Transactional(readOnly = true) Customer findByEmailAddress(EmailAddress emailAddress); @Override void save(final Customer customer); @Override void delete(final Customer customer); }
QueryDslCustomerRepository implements CustomerRepository { @Override @Transactional(readOnly = true) public Customer findById(Long id) { if (id == null) { return null; } return findOne(qCustomer.id.eq(id)); }  @Autowired void setDataSource(DataSource dataSource); @Override @Transactional(readOnly = true) Customer findById(Long id); @Override @Transactional(readOnly = true) List<Customer> findAll(); @Override @Transactional(readOnly = true) Customer findByEmailAddress(EmailAddress emailAddress); @Override void save(final Customer customer); @Override void delete(final Customer customer);  }