code: private List<Entity> findAllBatch(List<Object> ids) {
      String entityTypeId = getEntityType().getId();
      Multimap<Boolean, Object> partitionedIds =
          Multimaps.index(
              ids, id -> transactionInformation.isEntityDirty(EntityKey.create(entityTypeId, id)));
      Collection<Object> cleanIds = partitionedIds.get(false);
      Collection<Object> dirtyIds = partitionedIds.get(true);
  
      Map<Object, Entity> result =
          newHashMap(uniqueIndex(l2Cache.getBatch(delegate(), cleanIds), Entity::getIdValue));
      result.putAll(delegate().findAll(dirtyIds.stream()).collect(toMap(Entity::getIdValue, e -> e)));
  
      return ids.stream().filter(result::containsKey).map(result::get).collect(toList());
    }
docs: Retrieves a batch of Entity IDs.
  
  <p>If currently in transaction, splits the ids into those that have been dirtied in the current
  transaction and those that have been left untouched. The untouched ids are loaded through the
  cache, the dirtied ids are loaded from the decorated repository directly.
  
  @param ids list of entity IDs to retrieve
  @return List of {@link Entity}s, missing ones excluded.