use of org.camunda.bpm.engine.rest.dto.identity.TenantQueryDto in project camunda-bpm-platform by camunda.
the class TenantRestServiceImpl method queryTenants.
public List<TenantDto> queryTenants(UriInfo uriInfo, Integer firstResult, Integer maxResults) {
TenantQueryDto queryDto = new TenantQueryDto(getObjectMapper(), uriInfo.getQueryParameters());
TenantQuery query = queryDto.toQuery(getProcessEngine());
List<Tenant> tenants;
if (firstResult != null || maxResults != null) {
tenants = executePaginatedQuery(query, firstResult, maxResults);
} else {
tenants = query.list();
}
return TenantDto.fromTenantList(tenants);
}
use of org.camunda.bpm.engine.rest.dto.identity.TenantQueryDto in project camunda-bpm-platform by camunda.
the class TenantRestServiceImpl method getTenantCount.
public CountResultDto getTenantCount(UriInfo uriInfo) {
TenantQueryDto queryDto = new TenantQueryDto(getObjectMapper(), uriInfo.getQueryParameters());
TenantQuery query = queryDto.toQuery(getProcessEngine());
long count = query.count();
return new CountResultDto(count);
}
Aggregations