Minor refactor

This commit is contained in:
Tadgh 2020-03-13 19:15:46 -07:00
parent a39ac886af
commit 6f872ffb51
1 changed files with 4 additions and 9 deletions

View File

@ -272,15 +272,10 @@ public class IdHelperService {
.map(t -> t.getIdPartAsLong())
.collect(Collectors.toList());
if (!pids.isEmpty()) {
Collection<Object[]> lookups = myResourceTableDao.findLookupFieldsByResourcePid(pids);
for (Object[] next : lookups) {
String resourceType = (String) next[0];
Long resourcePid = (Long) next[1];
Date deletedAt = (Date) next[2];
retVal.add(new ResourceLookup(resourceType, resourcePid, deletedAt));
}
myResourceTableDao.findLookupFieldsByResourcePid(pids)
.stream()
.map(lookup -> new ResourceLookup((String)lookup[0], (Long)lookup[1], (Date)lookup[2]))
.forEach(retVal::add);
}
}