code: public <E> Predicate<E> toEntityPredicate(StorageKey key, EntityAccessor<E> accessor) {
      if (key != null) {
        Map<String, Predicate> predicates = minimizeFor(key);
        if (predicates.isEmpty()) {
          return alwaysTrue();
        }
        return entityPredicate(predicates, schema, accessor, strategy);
      }
      return toEntityPredicate(accessor);
    }
docs: Get a {@link Predicate} for testing entity objects that match the given
  {@link StorageKey}.
  
  @param <E> The type of entities to be matched
  @param key a StorageKey for entities tested with the Predicate
  @return a Predicate to test if entity objects satisfy this constraint set