Was added the findEntityViewByIdAsync method
This commit is contained in:
parent
3a3f6636e1
commit
80c2721d1d
@ -15,12 +15,10 @@
|
||||
*/
|
||||
package org.thingsboard.server.dao.entityview;
|
||||
|
||||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
import org.thingsboard.server.common.data.EntityType;
|
||||
import org.thingsboard.server.common.data.EntityView;
|
||||
import org.thingsboard.server.common.data.id.CustomerId;
|
||||
import org.thingsboard.server.common.data.id.EntityId;
|
||||
import org.thingsboard.server.common.data.id.EntityViewId;
|
||||
import org.thingsboard.server.common.data.id.TenantId;
|
||||
import org.thingsboard.server.common.data.id.*;
|
||||
import org.thingsboard.server.common.data.page.TextPageData;
|
||||
import org.thingsboard.server.common.data.page.TextPageLink;
|
||||
|
||||
@ -57,4 +55,6 @@ public interface EntityViewService {
|
||||
TextPageLink pageLink);
|
||||
|
||||
void unassignCustomerEntityViews(TenantId tenantId, CustomerId customerId);
|
||||
|
||||
ListenableFuture<EntityView> findEntityViewByIdAsync(EntityViewId entityViewId);
|
||||
}
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.thingsboard.server.dao.entityview;
|
||||
|
||||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -190,6 +191,13 @@ public class EntityViewServiceImpl extends AbstractEntityService
|
||||
new CustomerEntityViewsUnAssigner(tenantId).removeEntities(customerId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ListenableFuture<EntityView> findEntityViewByIdAsync(EntityViewId entityViewId) {
|
||||
log.trace("Executing findDeviceById [{}]", entityViewId);
|
||||
validateId(entityViewId, INCORRECT_ENTITY_VIEW_ID + entityViewId);
|
||||
return entityViewDao.findByIdAsync(entityViewId.getId());
|
||||
}
|
||||
|
||||
private DataValidator<EntityView> entityViewValidator =
|
||||
new DataValidator<EntityView>() {
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user