Removed provision info from device dao
This commit is contained in:
parent
70b8647ef4
commit
263dd8f9b3
@ -214,7 +214,4 @@ public interface DeviceDao extends Dao<Device> {
|
||||
* @return the list of device objects
|
||||
*/
|
||||
PageData<Device> findDevicesByTenantIdAndProfileId(UUID tenantId, UUID profileId, PageLink pageLink);
|
||||
|
||||
Optional<Device> findDeviceByProfileNameAndDeviceDataProvisionConfigurationPair(String profileName, String provisionDeviceKey, String provisionDeviceSecret);
|
||||
|
||||
}
|
||||
|
||||
@ -168,13 +168,4 @@ public interface DeviceRepository extends PagingAndSortingRepository<DeviceEntit
|
||||
DeviceEntity findByTenantIdAndId(UUID tenantId, UUID id);
|
||||
|
||||
Long countByDeviceProfileId(UUID deviceProfileId);
|
||||
|
||||
@Query(value = "SELECT * FROM Device as d " +
|
||||
"WHERE d.device_data->'configuration'->>'provisionDeviceKey' = :provisionDeviceKey " +
|
||||
"AND d.device_data->'configuration'->>'provisionDeviceSecret' = :provisionDeviceSecret " +
|
||||
"AND d.type = :profileName",
|
||||
nativeQuery = true)
|
||||
DeviceEntity findDeviceByProfileNameAndDeviceDataProvisionConfigurationPair(@Param("profileName") String profileName,
|
||||
@Param("provisionDeviceKey") String provisionDeviceKey,
|
||||
@Param("provisionDeviceSecret") String provisionDeviceSecret);
|
||||
}
|
||||
|
||||
@ -219,11 +219,6 @@ public class JpaDeviceDao extends JpaAbstractSearchTextDao<DeviceEntity, Device>
|
||||
return deviceRepository.countByDeviceProfileId(deviceProfileId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Optional<Device> findDeviceByProfileNameAndDeviceDataProvisionConfigurationPair(String profileName, String provisionDeviceKey, String provisionDeviceSecret) {
|
||||
return Optional.ofNullable(DaoUtil.getData(deviceRepository.findDeviceByProfileNameAndDeviceDataProvisionConfigurationPair(profileName, provisionDeviceKey, provisionDeviceSecret)));
|
||||
}
|
||||
|
||||
private List<EntitySubtype> convertTenantDeviceTypesToDto(UUID tenantId, List<String> types) {
|
||||
List<EntitySubtype> list = Collections.emptyList();
|
||||
if (types != null && !types.isEmpty()) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user