use of de.metas.ui.web.view.ViewRowIdsOrderedSelection in project metasfresh-webui-api by metasfresh.
the class HUEditorViewBuffer_HighVolume method huIdsPageFetcher.
private PageFetcher<Integer> huIdsPageFetcher(final List<DocumentQueryOrderBy> orderBys) {
final ViewEvaluationCtx viewEvalCtx = getViewEvaluationCtx();
final ViewRowIdsOrderedSelection selection = getSelection(orderBys);
return (firstRow, maxRows) -> huEditorRepo.retrieveHUIdsPage(viewEvalCtx, selection, firstRow, maxRows);
}
use of de.metas.ui.web.view.ViewRowIdsOrderedSelection in project metasfresh-webui-api by metasfresh.
the class HUEditorViewBuffer_HighVolume method changeSelection.
/**
* @return true if selection was really changed
*/
private boolean changeSelection(final UnaryOperator<ViewRowIdsOrderedSelection> mapper) {
final ViewRowIdsOrderedSelection defaultSelectionOld = defaultSelectionRef.getValue();
// make sure it's not null (might be null if it was invalidated)
defaultSelectionRef.computeIfNull(defaultSelectionFactory);
final ViewRowIdsOrderedSelection defaultSelectionNew = defaultSelectionRef.compute(mapper);
// invalidate all the other selections, let it recompute when needed
selectionsByOrderBys.clear();
return !Objects.equals(defaultSelectionOld, defaultSelectionNew);
}
Aggregations