@Test @DatabaseSetup("classpath:dbunit/user.xml") public void testFindByEmail() { User user = userDao.findByEmail(AbstractServiceTest.SYSTEM_TENANT_ID,"sysadm@thingsboard.org"); assertNotNull("User is expected to be not null", user); assertEquals("9cb58ba0-27c1-11e7-93ae-92361f002671", user.getId().toString()); assertEquals("c97ea14e-27c1-11e7-93ae-92361f002671", user.getTenantId().toString()); assertEquals("cdf9c79e-27c1-11e7-93ae-92361f002671", user.getCustomerId().toString()); assertEquals(Authority.SYS_ADMIN, user.getAuthority()); assertEquals("John", user.getFirstName()); assertEquals("Doe", user.getLastName()); }
@Override public User findByEmail(TenantId tenantId, String email) { return DaoUtil.getData(userRepository.findByEmail(email)); }
JpaUserDao extends JpaAbstractSearchTextDao<UserEntity, User> implements UserDao { @Override public User findByEmail(TenantId tenantId, String email) { return DaoUtil.getData(userRepository.findByEmail(email)); } }
JpaUserDao extends JpaAbstractSearchTextDao<UserEntity, User> implements UserDao { @Override public User findByEmail(TenantId tenantId, String email) { return DaoUtil.getData(userRepository.findByEmail(email)); }  }
JpaUserDao extends JpaAbstractSearchTextDao<UserEntity, User> implements UserDao { @Override public User findByEmail(TenantId tenantId, String email) { return DaoUtil.getData(userRepository.findByEmail(email)); }  @Override User findByEmail(TenantId tenantId, String email); @Override PageData<User> findByTenantId(UUID tenantId, PageLink pageLink); @Override PageData<User> findTenantAdmins(UUID tenantId, PageLink pageLink); @Override PageData<User> findCustomerUsers(UUID tenantId, UUID customerId, PageLink pageLink); }
JpaUserDao extends JpaAbstractSearchTextDao<UserEntity, User> implements UserDao { @Override public User findByEmail(TenantId tenantId, String email) { return DaoUtil.getData(userRepository.findByEmail(email)); }  @Override User findByEmail(TenantId tenantId, String email); @Override PageData<User> findByTenantId(UUID tenantId, PageLink pageLink); @Override PageData<User> findTenantAdmins(UUID tenantId, PageLink pageLink); @Override PageData<User> findCustomerUsers(UUID tenantId, UUID customerId, PageLink pageLink);  }