|
|
|
@ -20,6 +20,7 @@ import org.hibernate.exception.ConstraintViolationException; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.context.annotation.Lazy; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.transaction.event.TransactionalEventListener; |
|
|
|
import org.thingsboard.server.common.data.Device; |
|
|
|
import org.thingsboard.server.common.data.DeviceProfile; |
|
|
|
@ -36,7 +37,6 @@ import org.thingsboard.server.common.data.id.DeviceProfileId; |
|
|
|
import org.thingsboard.server.common.data.id.TenantId; |
|
|
|
import org.thingsboard.server.common.data.page.PageData; |
|
|
|
import org.thingsboard.server.common.data.page.PageLink; |
|
|
|
import org.thingsboard.server.common.data.queue.Queue; |
|
|
|
import org.thingsboard.server.dao.entity.AbstractCachedEntityService; |
|
|
|
import org.thingsboard.server.dao.exception.DataValidationException; |
|
|
|
import org.thingsboard.server.dao.queue.QueueService; |
|
|
|
@ -159,7 +159,8 @@ public class DeviceProfileServiceImpl extends AbstractCachedEntityService<Device |
|
|
|
this.removeDeviceProfile(tenantId, deviceProfile); |
|
|
|
} |
|
|
|
|
|
|
|
private void removeDeviceProfile(TenantId tenantId, DeviceProfile deviceProfile) { |
|
|
|
@Transactional |
|
|
|
void removeDeviceProfile(TenantId tenantId, DeviceProfile deviceProfile) { |
|
|
|
DeviceProfileId deviceProfileId = deviceProfile.getId(); |
|
|
|
try { |
|
|
|
deviceProfileDao.removeById(tenantId, deviceProfileId.getId()); |
|
|
|
|