@Test @DatabaseSetup("classpath:dbunit/device_credentials.xml") public void testFindByDeviceId() { UUID deviceId = UUID.fromString("958e3a30-3215-11e7-93ae-92361f002671"); DeviceCredentials deviceCredentials = deviceCredentialsDao.findByDeviceId(SYSTEM_TENANT_ID, deviceId); assertNotNull(deviceCredentials); assertEquals("958e3314-3215-11e7-93ae-92361f002671", deviceCredentials.getId().getId().toString()); assertEquals("ID_1", deviceCredentials.getCredentialsId()); }
@Override public DeviceCredentials findByDeviceId(TenantId tenantId, UUID deviceId) { return DaoUtil.getData(deviceCredentialsRepository.findByDeviceId(deviceId)); }
JpaDeviceCredentialsDao extends JpaAbstractDao<DeviceCredentialsEntity, DeviceCredentials> implements DeviceCredentialsDao { @Override public DeviceCredentials findByDeviceId(TenantId tenantId, UUID deviceId) { return DaoUtil.getData(deviceCredentialsRepository.findByDeviceId(deviceId)); } }
JpaDeviceCredentialsDao extends JpaAbstractDao<DeviceCredentialsEntity, DeviceCredentials> implements DeviceCredentialsDao { @Override public DeviceCredentials findByDeviceId(TenantId tenantId, UUID deviceId) { return DaoUtil.getData(deviceCredentialsRepository.findByDeviceId(deviceId)); }  }
JpaDeviceCredentialsDao extends JpaAbstractDao<DeviceCredentialsEntity, DeviceCredentials> implements DeviceCredentialsDao { @Override public DeviceCredentials findByDeviceId(TenantId tenantId, UUID deviceId) { return DaoUtil.getData(deviceCredentialsRepository.findByDeviceId(deviceId)); }  @Override DeviceCredentials findByDeviceId(TenantId tenantId, UUID deviceId); @Override DeviceCredentials findByCredentialsId(TenantId tenantId, String credentialsId); }
JpaDeviceCredentialsDao extends JpaAbstractDao<DeviceCredentialsEntity, DeviceCredentials> implements DeviceCredentialsDao { @Override public DeviceCredentials findByDeviceId(TenantId tenantId, UUID deviceId) { return DaoUtil.getData(deviceCredentialsRepository.findByDeviceId(deviceId)); }  @Override DeviceCredentials findByDeviceId(TenantId tenantId, UUID deviceId); @Override DeviceCredentials findByCredentialsId(TenantId tenantId, String credentialsId);  }