Commit 263dd8f9b3074b98792d8872f97ac7c1aa07b052
1 parent
70b8647e
Removed provision info from device dao
Showing
3 changed files
with
0 additions
and
17 deletions
@@ -214,7 +214,4 @@ public interface DeviceDao extends Dao<Device> { | @@ -214,7 +214,4 @@ public interface DeviceDao extends Dao<Device> { | ||
214 | * @return the list of device objects | 214 | * @return the list of device objects |
215 | */ | 215 | */ |
216 | PageData<Device> findDevicesByTenantIdAndProfileId(UUID tenantId, UUID profileId, PageLink pageLink); | 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,13 +168,4 @@ public interface DeviceRepository extends PagingAndSortingRepository<DeviceEntit | ||
168 | DeviceEntity findByTenantIdAndId(UUID tenantId, UUID id); | 168 | DeviceEntity findByTenantIdAndId(UUID tenantId, UUID id); |
169 | 169 | ||
170 | Long countByDeviceProfileId(UUID deviceProfileId); | 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,11 +219,6 @@ public class JpaDeviceDao extends JpaAbstractSearchTextDao<DeviceEntity, Device> | ||
219 | return deviceRepository.countByDeviceProfileId(deviceProfileId); | 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 | private List<EntitySubtype> convertTenantDeviceTypesToDto(UUID tenantId, List<String> types) { | 222 | private List<EntitySubtype> convertTenantDeviceTypesToDto(UUID tenantId, List<String> types) { |
228 | List<EntitySubtype> list = Collections.emptyList(); | 223 | List<EntitySubtype> list = Collections.emptyList(); |
229 | if (types != null && !types.isEmpty()) { | 224 | if (types != null && !types.isEmpty()) { |