Skip to content

Commit

Permalink
#181 IDocumentViewSeelction.getByIds
Browse files Browse the repository at this point in the history
  • Loading branch information
teosarca committed Feb 27, 2017
1 parent 0531f47 commit 9d92d3f
Showing 1 changed file with 3 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
import java.util.Set;
import java.util.stream.Stream;

import org.adempiere.util.Check;
import org.adempiere.util.GuavaCollectors;
import org.adempiere.util.lang.impl.TableRecordReference;
import org.compiere.util.Evaluatee;

import com.google.common.collect.ImmutableList;

import de.metas.ui.web.exceptions.EntityNotFoundException;
import de.metas.ui.web.process.descriptor.WebuiRelatedProcessDescriptor;
import de.metas.ui.web.window.datatypes.DocumentId;
Expand Down Expand Up @@ -70,20 +70,7 @@ default IDocumentView getById(final int documentIdInt) throws EntityNotFoundExce

default List<IDocumentView> getByIds(final Set<DocumentId> documentIds)
{
Check.assumeNotEmpty(documentIds, "documentIds is not empty");
return documentIds.stream()
.map(documentId -> {
try
{
return getById(documentId);
}
catch (final EntityNotFoundException e)
{
return null;
}
})
.filter(document -> document != null)
.collect(GuavaCollectors.toImmutableList());
return streamByIds(documentIds).collect(ImmutableList.toImmutableList());
}

LookupValuesList getFilterParameterDropdown(String filterId, String filterParameterName, Evaluatee ctx);
Expand Down

0 comments on commit 9d92d3f

Please sign in to comment.