use of de.metas.ui.web.handlingunits.HUIdsFilterHelper.HUIdsFilterData in project metasfresh-webui-api by metasfresh.
the class HUEditorViewBuffer_HighVolume method isHighVolume.
public static boolean isHighVolume(final List<DocumentFilter> stickyFilters) {
final HUIdsFilterData huIdsFilterData = HUIdsFilterHelper.extractFilterDataOrNull(stickyFilters);
if (huIdsFilterData == null) {
return true;
}
final Set<Integer> huIds = huIdsFilterData.getInitialHUIds();
if (huIds == null) {
// high volume
return true;
} else if (huIds.isEmpty()) {
// not high volume
return false;
} else {
// consider high volume if it's above give threshold
return huIds.size() >= HIGHVOLUME_THRESHOLD;
}
}
Aggregations