@Test @DatabaseSetup("classpath:dbunit/user_credentials.xml") public void testFindByUserId() { UserCredentials userCredentials = userCredentialsDao.findByUserId(SYSTEM_TENANT_ID, UUID.fromString("787827e6-27d7-11e7-93ae-92361f002671")); assertNotNull(userCredentials); assertEquals("4b9e010c-27d5-11e7-93ae-92361f002671", userCredentials.getId().toString()); assertEquals(true, userCredentials.isEnabled()); assertEquals("password", userCredentials.getPassword()); assertEquals("ACTIVATE_TOKEN_2", userCredentials.getActivateToken()); assertEquals("RESET_TOKEN_2", userCredentials.getResetToken()); }
@Override public UserCredentials findByUserId(TenantId tenantId, UUID userId) { return DaoUtil.getData(userCredentialsRepository.findByUserId(userId)); }
JpaUserCredentialsDao extends JpaAbstractDao<UserCredentialsEntity, UserCredentials> implements UserCredentialsDao { @Override public UserCredentials findByUserId(TenantId tenantId, UUID userId) { return DaoUtil.getData(userCredentialsRepository.findByUserId(userId)); } }
JpaUserCredentialsDao extends JpaAbstractDao<UserCredentialsEntity, UserCredentials> implements UserCredentialsDao { @Override public UserCredentials findByUserId(TenantId tenantId, UUID userId) { return DaoUtil.getData(userCredentialsRepository.findByUserId(userId)); }  }
JpaUserCredentialsDao extends JpaAbstractDao<UserCredentialsEntity, UserCredentials> implements UserCredentialsDao { @Override public UserCredentials findByUserId(TenantId tenantId, UUID userId) { return DaoUtil.getData(userCredentialsRepository.findByUserId(userId)); }  @Override UserCredentials findByUserId(TenantId tenantId, UUID userId); @Override UserCredentials findByActivateToken(TenantId tenantId, String activateToken); @Override UserCredentials findByResetToken(TenantId tenantId, String resetToken); }
JpaUserCredentialsDao extends JpaAbstractDao<UserCredentialsEntity, UserCredentials> implements UserCredentialsDao { @Override public UserCredentials findByUserId(TenantId tenantId, UUID userId) { return DaoUtil.getData(userCredentialsRepository.findByUserId(userId)); }  @Override UserCredentials findByUserId(TenantId tenantId, UUID userId); @Override UserCredentials findByActivateToken(TenantId tenantId, String activateToken); @Override UserCredentials findByResetToken(TenantId tenantId, String resetToken);  }