Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Formatting reverts
  • Loading branch information
jjoyce0510 committed Jun 4, 2021
commit 1480fc38d7fd1b612ef3353fc712cffd3fcf645b
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,9 @@ public Entity getEntity(@Nonnull final Urn urn, @Nonnull final Set<String> aspec
}

/**
* Retrieves multiple entities of <b>the same type</b>.
* Retrieves multiple entities.
*
* @param urns set of urns of the same entity type to fetch
* @param urns set of urns to fetch
* @param aspectNames set of aspects to fetch
* @return a map of {@link Urn} to {@link Entity} object
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ public Map<Urn, List<RecordTemplate>> getLatestAspects(@Nonnull final Set<Urn> u
final Set<EbeanAspectV2.PrimaryKey> dbKeys = urns.stream()
.map(urn -> {
final Set<String> aspectsToFetch = aspectNames.isEmpty()
? getEntityAspectNames(urn)
: aspectNames;
? getEntityAspectNames(urn)
: aspectNames;
return aspectsToFetch.stream()
.map(aspectName -> new EbeanAspectV2.PrimaryKey(urn.toString(), aspectName, LATEST_ASPECT_VERSION))
.collect(Collectors.toList());
.map(aspectName -> new EbeanAspectV2.PrimaryKey(urn.toString(), aspectName, LATEST_ASPECT_VERSION))
.collect(Collectors.toList());
})
.flatMap(List::stream)
.collect(Collectors.toSet());
Expand Down