caio.co/de/cerberus

Drop RecipeMetadataDatabase.findAllById(List<Long>)

No point in supporting this at the moment.
Id
ae0661c7225d817dd2e8f69735ffdc3b53a692c6
Author
Caio
Commit time
2019-05-21T09:38:26+02:00

Modified src/main/java/co/caio/cerberus/db/RecipeMetadataDatabase.java

@@ -7,8 +7,6

Optional<RecipeMetadata> findById(long recipeId);

- List<RecipeMetadata> findAllById(List<Long> recipeIds);
-
void saveAll(List<RecipeMetadata> recipes);

default void close() {}

Modified src/main/java/co/caio/cerberus/db/SimpleRecipeMetadataDatabase.java

@@ -77,11 +77,6
}

@Override
- public List<RecipeMetadata> findAllById(List<Long> recipeIds) {
- return null;
- }
-
- @Override
public void saveAll(List<RecipeMetadata> recipes) {
throw new RecipeMetadataDbException("Read-only! Use the Writer inner class to create a db");
}

Modified src/test/java/co/caio/cerberus/db/HashMapRecipeMetadataDatabase.java

@@ -1,6 +1,5
package co.caio.cerberus.db;

-import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -17,13 +16,6
@Override
public Optional<RecipeMetadata> findById(long recipeId) {
return Optional.ofNullable(map.get(recipeId));
- }
-
- @Override
- public List<RecipeMetadata> findAllById(List<Long> recipeIds) {
- var result = new ArrayList<RecipeMetadata>();
- recipeIds.forEach(id -> findById(id).ifPresent(result::add));
- return result;
}

@Override