Commit 263dd8f9b3074b98792d8872f97ac7c1aa07b052

Authored by zbeacon
1 parent 70b8647e

Removed provision info from device dao

... ... @@ -214,7 +214,4 @@ public interface DeviceDao extends Dao<Device> {
214 214 * @return the list of device objects
215 215 */
216 216 PageData<Device> findDevicesByTenantIdAndProfileId(UUID tenantId, UUID profileId, PageLink pageLink);
217   -
218   - Optional<Device> findDeviceByProfileNameAndDeviceDataProvisionConfigurationPair(String profileName, String provisionDeviceKey, String provisionDeviceSecret);
219   -
220 217 }
... ...
... ... @@ -168,13 +168,4 @@ public interface DeviceRepository extends PagingAndSortingRepository<DeviceEntit
168 168 DeviceEntity findByTenantIdAndId(UUID tenantId, UUID id);
169 169
170 170 Long countByDeviceProfileId(UUID deviceProfileId);
171   -
172   - @Query(value = "SELECT * FROM Device as d " +
173   - "WHERE d.device_data->'configuration'->>'provisionDeviceKey' = :provisionDeviceKey " +
174   - "AND d.device_data->'configuration'->>'provisionDeviceSecret' = :provisionDeviceSecret " +
175   - "AND d.type = :profileName",
176   - nativeQuery = true)
177   - DeviceEntity findDeviceByProfileNameAndDeviceDataProvisionConfigurationPair(@Param("profileName") String profileName,
178   - @Param("provisionDeviceKey") String provisionDeviceKey,
179   - @Param("provisionDeviceSecret") String provisionDeviceSecret);
180 171 }
... ...
... ... @@ -219,11 +219,6 @@ public class JpaDeviceDao extends JpaAbstractSearchTextDao<DeviceEntity, Device>
219 219 return deviceRepository.countByDeviceProfileId(deviceProfileId);
220 220 }
221 221
222   - @Override
223   - public Optional<Device> findDeviceByProfileNameAndDeviceDataProvisionConfigurationPair(String profileName, String provisionDeviceKey, String provisionDeviceSecret) {
224   - return Optional.ofNullable(DaoUtil.getData(deviceRepository.findDeviceByProfileNameAndDeviceDataProvisionConfigurationPair(profileName, provisionDeviceKey, provisionDeviceSecret)));
225   - }
226   -
227 222 private List<EntitySubtype> convertTenantDeviceTypesToDto(UUID tenantId, List<String> types) {
228 223 List<EntitySubtype> list = Collections.emptyList();
229 224 if (types != null && !types.isEmpty()) {
... ...