protected void applySortBy(
     BatchQuery query, String sortBy, Map<String, Object> parameters, ProcessEngine engine) {
   if (sortBy.equals(SORT_BY_BATCH_ID_VALUE)) {
     query.orderById();
   } else if (sortBy.equals(SORT_BY_TENANT_ID_VALUE)) {
     query.orderByTenantId();
   }
 }
 protected void applyFilters(BatchQuery query) {
   if (batchId != null) {
     query.batchId(batchId);
   }
   if (type != null) {
     query.type(type);
   }
   if (TRUE.equals(withoutTenantId)) {
     query.withoutTenantId();
   }
   if (tenantIds != null && !tenantIds.isEmpty()) {
     query.tenantIdIn(tenantIds.toArray(new String[tenantIds.size()]));
   }
   if (TRUE.equals(suspended)) {
     query.suspended();
   }
   if (FALSE.equals(suspended)) {
     query.active();
   }
 }